| name | babysit-pr | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| description | Monitor a pull request through review and CI. Use when the user asks to monitor, watch, or babysit a PR. | ||||||||||||
| metadata |
|
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
| export async function gzip(input: Uint8Array|string): Promise<Uint8Array> { | |
| if (typeof input === 'string') { | |
| const encoder = new TextEncoder(); | |
| input = encoder.encode(input); | |
| } | |
| const cs = new CompressionStream('gzip'); | |
| const buffer = new Response(cs.readable).arrayBuffer(); | |
| const writer = cs.writable.getWriter(); | |
| await writer.write(input); | |
| await writer.close(); |
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
| const s = document.createElement('script'); s.src = 'https://colorjs.io/dist/color.global.js'; document.body.appendChild(s); | |
| // wait for load | |
| function colorize(hue) { | |
| $$("body *").forEach(e => { | |
| if (e.tagName.toUpperCase() === 'SVG' || e.closest('svg')) return; | |
| const s = getComputedStyle(e); | |
| for (const prop of s) { | |
| if (prop.startsWith('-webkit')) continue; | |
| const value = s[prop]; |
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
| # Cheat sheet at https://dockerlabs.collabnix.com/docker/cheatsheet/ | |
| # Creates a Docker image on the current directory (must have a Dockerfile) | |
| docker build -t $IMAGE_NAME . | |
| # Run the recently built image | |
| docker run $IMAGE_NAME | |
| # Deletes all containers and all images | |
| docker container prune && docker image prune -a |
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
| [ | |
| { | |
| "key": "cmd+0", | |
| "command": "workbench.action.openLastEditorInGroup" | |
| }, | |
| { | |
| "key": "cmd+1", | |
| "command": "workbench.action.openEditorAtIndex1" | |
| }, | |
| { |
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
| # Taken from https://github.com/zeit/hyper-site/issues/31 | |
| function printcolors() { | |
| echo | |
| echo -e "\033[0mNC (No color)" | |
| echo -e "\033[1;37mWHITE \033[0;30mBLACK" | |
| echo -e "\033[0;34mBLUE \033[1;34mLIGHT_BLUE" | |
| echo -e "\033[0;32mGREEN \033[1;32mLIGHT_GREEN" | |
| echo -e "\033[0;36mCYAN \033[1;36mLIGHT_CYAN" | |
| echo -e "\033[0;31mRED \033[1;31mLIGHT_RED" |
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
| # Create a patch file | |
| diff -u file.old file.new > file.patch | |
| # Apply a patch | |
| patch < file.patch | |
| # Create a backup before applying patch | |
| patch -b < file.patch | |
| # Create a versioned backup before applying patch |
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/bash | |
| printable_colours=256 | |
| # DEFAULTS | |
| SIZE=480 | |
| FPS=15 | |
| LENGTH=2 | |
| # Report usage | |
| usage() { |
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
| var unique = n => Array.from(new Set((n+'').split(''))).length === (n+'').length | |
| var possibilities1 = [] | |
| var possibilities2 = [] | |
| var combos = [] | |
| for (var i = 1234; i < 9876; i++) { | |
| if (!(i+'').includes('0') && unique(i)) possibilities1.push(i) | |
| } | |
| for (var i = 12345; i < 98765; i++) { |
NewerOlder

