Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| //! # `braces` | |
| //! | |
| //! This module implements Bash-like brace expansion. It supports | |
| //! comma-separated options (e.g. `"a{b,c}d"` expands to `["abd", "acd"]`), | |
| //! numeric sequences (e.g. `"file{1..3}.txt"`), alpha sequences, and even | |
| //! nested brace expressions. It also supports stepped sequences (e.g. to | |
| //! generate 10, 20, 30, etc. use `"file{10..30..10}.txt"`). | |
| //! | |
| //! The overall algorithm is similar to the TypeScript version: first the | |
| //! string is “escaped” by swapping literal chars for tokens, balanced brace |
| #!/bin/sh | |
| # A modification of the standard Deno installation script (https://deno.land/install.sh) | |
| # updated to support downloading a Linux arm64 binary from LukeChannings/deno-arm64 | |
| set -e | |
| if ! command -v unzip >/dev/null; then | |
| echo "Error: unzip is required to install Deno (see: https://github.com/denoland/deno_install#unzip-is-required)." 1>&2 | |
| exit 1 | |
| fi |
| type Query { | |
| page( | |
| # A URL to fetch the HTML source from. | |
| url: String | |
| # A string containing HTML to be used as the source document. | |
| source: String | |
| ): Document | |
| } |
| # SOURCE: https://starship.rs/config | |
| # DEBUG via: `starship explain` | |
| # Timeout for commands executed by starship (ms) | |
| command_timeout = 1000 | |
| # Replace the "❯" | |
| [character] | |
| success_symbol = "[λ](green)" |
| /** | |
| * Maps a callback to an element in an array-like object | |
| * Basically a copy of underscore's _.each | |
| * source: http://underscorejs.org/docs/underscore.html#section-20 | |
| */ | |
| export function forEach(obj, iteratee, context) { | |
| let ctx = this; | |
| const isObject = function(obj) { |
| // Creates a new promise that automatically resolves after some timeout: | |
| Promise.delay = function (time) { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(resolve, time) | |
| }) | |
| } | |
| // Throttle this promise to resolve no faster than the specified time: | |
| Promise.prototype.takeAtLeast = function (time) { | |
| return new Promise((resolve, reject) => { |
| var fs = require('fs'), | |
| path = require('path'), | |
| homeDir = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE, | |
| gitConfig = path.join(homeDir, '.gitconfig'), | |
| cwd = process.cwd(), | |
| name = cwd.split('/').pop(); | |
| /* | |
| decode function and required functions copied from | |
| https://github.com/npm/ini | |
| in order to parse github config without added reqs |
Set custom GitHub organization locations, like this one:
Since GitHub tries to make you choose from countries now, just use the API to get around it.
curl -X PATCH -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $GITHUB_TOKEN" \
https://api.github.com/orgs/$ORGANIZATION -d '{"location":"localhost:420"}'