Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| #!/bin/bash | |
| # Multicore minterpolate in ffmpeg | |
| # Just slice & process & concat | |
| # NB: The concat points between slices may be weird | |
| # Default arguments | |
| ff=/usr/bin/ffmpeg | |
| fps=60 | |
| dur=00:00:10 |
| // paste this into your chrome dev console for Speech Synthesis | |
| const originalFetch = window.fetch | |
| const patchedFetch = (...args) => { | |
| if (args[1].method == 'POST' && args[1].body.length > 0 && /moderations$/.test(args[0])) { | |
| const aiResponse = JSON.parse(args[1].body)["input"].split("\n\n\n") | |
| if (aiResponse.length > 1) { | |
| const text = aiResponse.slice(1).join(". ").trim() | |
| console.log(text) |
| #!/bin/zsh | |
| # Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3 | |
| # Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12) and macOS Ventura (13) | |
| # Disabling SIP is required ("csrutil disable" from Terminal in Recovery) | |
| # Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist | |
| # To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/* | |
| # user |
| # [2023-05-25] Added Copilot Chat, and VSCode Insiders | |
| # [2023-05-20] Add VSCode Insiders variant | |
| # [2023-02-22] Added Copilot Labs | |
| # Fix Github Co-pilot self-signed cert problem | |
| # See: https://github.com/orgs/community/discussions/8866#discussioncomment-3517831 | |
| # Note | |
| # | |
| # To make Github Copilot/Nightly/Labs/Chat work, you might need additional |
| #!/bin/bash | |
| function cleanLine() { | |
| local line key field | |
| line="$1" | |
| key="$2" | |
| field="$3" | |
| echo "$line" | jq -r "$key" | tr -d 'BbIi' | awk "{print toupper(\$$field)}" | numfmt --from=auto | |
| } |
| """Control log level with unix signals. | |
| When you run an application, usually you | |
| set the logging level on startup and it stays the | |
| same throughout the application's life. | |
| But what if you've started the application | |
| with logging level too high or too low? | |
| Using this technique, you can control the logging | |
| level of a running app without reloading or |
| #!/usr/bin/env bash | |
| echo "Begin environment relocation." | |
| NEW_ENV_DIR=$1 | |
| BASE_ENV=$(conda info --base) | |
| ######################################### | |
| # | |
| # Install jq locally | |
| # |
This (and related gists) captures how i created my docker swarm architecture. This is intended mostly for my own notes incase i need to re-creeate anything later! As such expect some typos and possibly even an error...
Each major task has its own gist, this is to help with maitainability long term.
| (function () { | |
| 'use strict'; | |
| // OSX JavaScript for Applications lacks the persistent 'properties' | |
| // of AppleScript (in which global variables and properties persist between script runs) | |
| // but we can, of course, serialise to JSON or plist at the end of a script | |
| // parsing it at the start of the next run. | |
| // Here is one approach to persistence between script runs | |
| // using JSON.stringify() and JSON.parse() |