This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| print_usage() { | |
| echo "usage: compress_video <input_file>" | |
| echo "supported formats: mp4, webm, mkv, mov, avi, flv" | |
| } | |
| get_extension() { | |
| f="${1##*/}" | |
| case "$f" in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { getRuntime } from "@astrojs/cloudflare/runtime"; | |
| import type { KVNamespace } from "@cloudflare/workers-types"; | |
| /** The KV key (eg, env["KV"]) */ | |
| const KV_KEY = "KV" as const; | |
| /** | |
| * Returns a Cloudflare Worker KV store. | |
| * In dev, it returns a mock one based on Miniflare. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { createFunction } from "inngest"; // v0.6.1 | |
| import { serve } from "inngest/cloudflare"; | |
| /** | |
| * Inngest serve requires "node_compat = true" to be set in your wrangler.toml | |
| * | |
| * Set INNGEST_SIGNING_KEY in your wrangler.toml environment variables. | |
| * Get this key in your Inngest dashboard: https://app.inngest.com/secrets | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::{ | |
| fs::File, | |
| io::{Read, Write}, | |
| time::Instant, | |
| }; | |
| use tokio::task::{self, JoinHandle}; | |
| async fn compute() { | |
| let handles: Vec<JoinHandle<_>> = (0..1000) | |
| .map(|_| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "runtime" | |
| "sync" | |
| "time" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Copyright (c) 2019 Valentin B. | |
| A simple music bot written in discord.py using youtube-dl. | |
| Though it's a simple example, music bots are complex and require much time and knowledge until they work perfectly. | |
| Use this as an example or a base for your own bot and extend it as you want. If there are any bugs, please let me know. | |
| Requirements: | |
| Python 3.5+ | |
| pip install -U discord.py pynacl youtube-dl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| esphome: | |
| name: esp32_2 | |
| platform: ESP32 | |
| board: lolin32 | |
| wifi: | |
| ssid: !secret ssid_iot | |
| password: !secret password_iot | |
| manual_ip: | |
| static_ip: 192.168.0.111 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| esphome: | |
| name: esp32_1 | |
| platform: ESP32 | |
| board: lolin32 | |
| wifi: | |
| ssid: !secret ssid_iot | |
| password: !secret password_iot | |
| manual_ip: | |
| static_ip: 192.168.0.110 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| provider "aws" { | |
| access_key = "${var.aws_access_key}" | |
| secret_key = "${var.aws_secret}" | |
| region = "${var.region}" | |
| } | |
| resource "aws_key_pair" "auth" { | |
| key_name = "${var.key_name}" | |
| public_key = "${file(var.public_key_path)}" | |
| } |
NewerOlder