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
Show hidden characters
| { | |
| // Applies a flat white on black theme with cyan borders and orange focus indicators. | |
| "workbench.colorTheme": "Default High Contrast", | |
| // Applies an orange border to the gutter instead of the current line. | |
| "editor.renderLineHighlight": "gutter", | |
| // Alternatively, you could adjust the border's alpha component. | |
| // "workbench.colorCustomizations": { "editor.lineHighlightBorder": "#F3851880" }, | |
| // Overwrites some of the Default High Contrast colors to: |
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
| javascript:void function(){ | |
| const s=new CSSStyleSheet; | |
| s.replaceSync(` | |
| .ytd-rich-grid-renderer { --ytd-rich-grid-items-per-row: 1; align-items: start; } | |
| ytd-rich-item-renderer { margin-inline: .5em !important; } | |
| ytd-rich-section-renderer:has(.shortsLockupViewModelHost) { display:none; } | |
| ytd-reel-shelf-renderer { display: none; } | |
| .yt-lockup-view-model { flex-direction: row; } | |
| .yt-lockup-view-model__content-image { flex-direction: column; width: 16em; margin-right: 1em; } | |
| `); |
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 | |
| if [ "$#" -ne 1 ]; then | |
| cat <<- EOF | |
| Usage: $0 PROJECT | |
| Creates the ~/workspace/PROJECT directory if it doesn't exist and opens it in VS Code. | |
| EOF | |
| exit 1 | |
| fi |
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
| [alias] | |
| # Deletes branches that are gone from remote | |
| gone = "!f() { git fetch --all --prune; git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D; }; f" |
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
| // Tag which parses a multiline regexp pattern into a RegExp object, removing whitespace and comments | |
| export function mrx (strings) { | |
| if (strings.length !== 1) { | |
| throw Error("mrx cannot process template strings with arguments.") | |
| }; | |
| // capture pattern and flags from a string in format `/pattern/flags` | |
| const captureRx = /^\s*\/(.*)\/([a-z]*)\s*$/si; | |
| const match = captureRx.exec(strings.raw[0]); | |
| if (match === null) { |
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
| // A tool to help you create or solve monoalphabetic substitution ciphers. | |
| // This code is left to the public domain. | |
| // | |
| // Run this in a Node interactive session or web browser console. | |
| // Start by creating a machine instance with m = machine(message); | |
| // Call m.replace() to progressively replace each letter with a new one. | |
| // Use lowercase for your original message and uppercase for the | |
| // substituted letters so you and the code can tell them apart. | |
| // m.frequency will give you the fequency of each letter in the message. |
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
| <!DOCTYPE html><html lang=en> | |
| <title>Template Site</title> |
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 random | |
| deck = None | |
| hand = None | |
| def speak(message="", penalty=""): | |
| maxlen = max(len(message), len(penalty)) | |
| # pad both parts even |