Copied from the readline documentation.
For MacOS, replace Ctrl with Cmd, and Meta with Option.
| Shortcut | Comment |
|---|---|
Ctrl+A |
Beginning of line |
Ctrl+B / ← |
Backward one character |
| # Find directories in music folder modified in last 240 hours | |
| fd . '/path/to/music/' \ | |
| --changed-within "240h" \ | |
| --min-depth 2 \ | |
| -d 2 \ | |
| | \ | |
| # Remove any paths containing @ symbol (Synology NAS quirk) | |
| rg -v '@' \ | |
| | \ |
| #!/usr/bin/env python | |
| import multiprocessing | |
| import random | |
| import time | |
| class Logger: | |
| def __init__(self, num_lines, last_output_per_process, terminal_lock): | |
| self.num_lines = num_lines |
Copied from the readline documentation.
For MacOS, replace Ctrl with Cmd, and Meta with Option.
| Shortcut | Comment |
|---|---|
Ctrl+A |
Beginning of line |
Ctrl+B / ← |
Backward one character |
Created as a module that can be imported or run. Requires built in JSON, requests, and datetime modules.
Allows you to clone a branch on Github using the Github Git Database API Endpoints.
Forked Gist from:
See:
| -- File: MarkUnreadEmails.scpt | |
| -- Description: Go through the mailboxes in Outlook and mark unread messages as read | |
| -- Author: Chad Armstrong | |
| -- Date: 22 November 2019 | |
| tell application "Microsoft Outlook" | |
| set myInbox to folder "Inbox" of default account | |
| set github to folder "GitHub" of myInbox | |
| set other to folder "Other" of myInbox |
| #!/bin/bash | |
| RULES=$(aws waf list-rules | jq -r ".Rules[] | .RuleId") | |
| for rule in $RULES; do | |
| TOKEN=$(aws waf get-change-token | jq -r .ChangeToken) | |
| PRED=$(aws waf get-rule --rule-id $rule | jq ".Rule.Predicates[0]") | |
| aws waf update-rule --cli-input-json '{"RuleId": "'$rule'", "ChangeToken": "'$TOKEN'", "Updates": [{"Action": "DELETE", "Predicate": '"$PRED"'}]}' |
| # Typical use-case is decoding an AWS STS message. The DecodedMessage key contains escaped JSON. | |
| jq '.DecodedMessage | fromjson | .' message.json |
| # npm using https for git | |
| git config --global url."https://github.com/".insteadOf git@github.com: | |
| git config --global url."https://".insteadOf git:// | |
| # npm using git for https | |
| git config --global url."git@github.com:".insteadOf https://github.com/ | |
| git config --global url."git://".insteadOf https:// |
| #!/bin/bash | |
| # Author: Thomas Berezansky <tsbere@mvlc.org> | |
| # Author: Jason Stephenson <jason@sigio.com> | |
| # | |
| # Feel free to use and to share this script in anyway you like. | |
| # This script is intended as a shortcut for the git cherry-pick | |
| # command when you have several commits that you want to cherry-pick | |
| # into your local branch from another branch. It often results in a |