Tutorial and tips for GitHub Actions workflows
This file contains 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 { createHash } from "crypto"; | |
import { createServer, IncomingMessage } from "http"; | |
import { Duplex } from "stream"; | |
type WsFn = (val: string | Uint8Array) => void; | |
// Create this object whenever a websocket connection has been established | |
type WebSocket = { | |
write: WsFn; | |
addListener: (listener: WsFn) => void; |
This file contains 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
#!/usr/bin/env bash | |
START_TIME=$SECONDS | |
set -e | |
echo "-----START GENERATING HLS STREAM-----" | |
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME] | |
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1 | |
# comment/add lines here to control which renditions would be created | |
renditions=( |
One of the earliest goals of Kinto team was to make every Git repository deployable to the cloud and compatible with any other repository. KintoCompose will aim to do this as an open source initiative.
Kinto
is inspired by the kinto'un which is the magic cloud that Son Goku rides in Dragon Ball Z, or Wu Kong in the journey to the west.Compose
inspired bydocker-compose
andgo modules
through combining git repositories and their configuration to be served into any cloud via kubernetes.
- Serve any Git repository into a public and private endpoint with ease.
This file contains 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
const puppeteer = require('puppeteer'); | |
const prettier = require('prettier'); | |
const atob = require('atob'); | |
const btoa = require('btoa'); | |
const scriptUrlPatterns = [ | |
'*' | |
] | |
const requestCache = new Map(); |
This file contains 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
class Worker | |
def self.start(num_threads:, queue_size:) | |
queue = SizedQueue.new(queue_size) | |
worker = new(num_threads: num_threads, queue: queue) | |
worker.spawn_threads | |
worker | |
end | |
def initialize(num_threads:, queue:) | |
@num_threads = num_threads |
This file contains 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 fs from 'fs'; | |
let WindowXMLHttpRequest = null; | |
/** | |
* An XMLHttpRequest-compatible interface to Node's "fs" module. | |
*/ | |
class FSXHR { | |
constructor() { | |
/** |
This file contains 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 time | |
import signal | |
def busy_work(seconds): | |
print("Start busy_work") | |
time.sleep(seconds) | |
print("Stop busy_work") | |
This file contains 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
document.querySelector('#readme').setAttribute('style', 'position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 100; background-color: white'); | |
document.querySelector('body').appendChild(document.querySelector('#readme')); | |
document.querySelector('article').style.borderWidth = 0; | |
window.print(); |
NewerOlder