This gist contains the preview for ternimal.
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
| # lazyload nvm | |
| # all props goes to http://broken-by.me/lazy-load-nvm/ | |
| # grabbed from reddit @ https://www.reddit.com/r/node/comments/4tg5jg/lazy_load_nvm_for_faster_shell_start/ | |
| # NOTE: globally installed npm packages are not in PATH | |
| # unless one of the commands (npm, node, npm, npx) is run first | |
| export NVM_DIR="$HOME/.nvm" | |
| lazynvm() { | |
| unset -f nvm node npm npx lazynvm | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm |
This gist contains the preview image for rollup-plugin-output-size.
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
| #!/usr/bin/env bash | |
| # Backs up and restores gnome3 keybindings | |
| # Tested with Gnome 3.36.8 | |
| # by peterrus | |
| set -e | |
| mkdir -p gnome3-keybind-backup |
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
| // open all bitbucket prs in a new tab | |
| // https://bitbucket.org/dashboard/pullrequests | |
| function bitbucketOpenAllPRs() { | |
| const list = document.querySelector('.pullrequest-list'); | |
| const links = list ? Array.from(list.querySelectorAll('a.execute')) : []; | |
| for (const link of links) { | |
| link.dispatchEvent( | |
| new MouseEvent('click', { ctrlKey: true, shiftKey: true }) | |
| ); |
See references:
- https://www.speedrun.com/celeste/thread/n96q8/1#6thmm
- https://docs.google.com/document/d/1OglBKMiR_nDIgPTp5LHldOPj9mLxln4HKw_F5C3XDl8/edit
This uses xdotool instead of AutoHotkey. You would have to bind the shortcut key yourself.
Note: Do read up on the references above to see how the fast chapter restart works.
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
| ts-node -r tsconfig-paths/register src/main.ts | |
| node -r ts-node/register --max-old-space-size=4096 index.ts |
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 http = require("http"); | |
| const httpProxy = require("http-proxy"); | |
| // set your port and target URLs | |
| const port = 8000; | |
| const web = httpProxy.createProxyServer({ target: "http://localhost:8080" }); | |
| const api = httpProxy.createProxyServer({ target: "http://localhost:8081" }); | |
| // use API proxy for requests asking for `/api` resource | |
| const server = http.createServer((req, res) => { |
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 { S3 } from 'aws-sdk'; | |
| // or public async | |
| async function deleteAllS3Objects() { | |
| // setup | |
| const s3client: S3 = this.s3client; // new S3(options) | |
| const bucketName: string = this.bucketName; // set bucket name | |
| // I activate my trap! | |
| // This deletes all S3 Objects on the specified bucket! |
NewerOlder