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/bash | |
| # This instructs macOS to remap space characters from a given HID device VendorID and ProductID to a null character, thus ignoring space input. | |
| # | |
| # Intended to exclude space characters coming from non-keyboard HID devices that may insert them for some reason, | |
| # such as the "iP54 OriginCal Absolute Digital Calipers with Smart Wireless Data Output." | |
| # Change these values as needed to suit a particular HID device. | |
| # Relevant values can be found via `system_profiler SPBluetoothDataType` | |
| # The values below are for the "iP54 OriginCal Absolute Digital Calipers with Smart Wireless Data Output" |
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
| [ | |
| { "keys": ["home"], "command": "move_to", "args": {"to": "bol"} }, | |
| { "keys": ["end"], "command": "move_to", "args": {"to": "eol"} }, | |
| { "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} }, | |
| { "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true } }, | |
| { "keys": ["command+home"], "command": "move_to", "args": {"to": "bof" } }, | |
| { "keys": ["command+end"], "command": "move_to", "args": {"to": "eof" } }, | |
| { "keys": ["shift+command+home"], "command": "move_to", "args": {"to": "bof", "extend": true } }, | |
| { "keys": ["shift+command+end"], "command": "move_to", "args": {"to": "eof", "extend": true } }, | |
| ] |
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 | |
| set -eu | |
| # from https://askubuntu.com/a/1536468 | |
| LANG=C snap list --all | awk '/disabled/{print $1, $3}' | | |
| while read snapname revision; do | |
| snap remove "$snapname" --revision="$revision" | |
| done |
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
| ##h1:has-text(AI Overview):xpath(./ancestor::div[(@data-mcpr)]) | |
| ##span:has-text(People also ask):xpath(./ancestor::div[(@jscontroller)]) |
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/bash | |
| if [ $# -eq 0 ]; then | |
| echo "This script can be used to transfer *all* files from a BaseSpace project to a Google Storage bucket" | |
| echo "Usage: $0 BaseSpaceProjectName GCPBucketPrefix" | |
| echo "" | |
| echo " NOTE: This will download data from BaseSpace to the machine running this script" | |
| echo " before uploading to GS, so ample uninterrupted bandwidth is required" | |
| echo " for upload and download." | |
| echo " Files are piped, so disk usage required for the transfer is negligible." |
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/bash | |
| # Disable web URL link previews in Apple Mail under macOS 13.x Ventura (14.x+ has a UI setting to do so). | |
| # from: | |
| # https://apple.stackexchange.com/questions/450339/turn-off-link-preview-in-mail#comment669426_457934 | |
| sudo defaults write /Library/Preferences/FeatureFlags/Domain/Mail.plist RichLinks -dict-add Enabled -bool NO | |
| sudo chmod -R o+rX /Library/Preferences/FeatureFlags |
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/bash | |
| sudo powermetrics --samplers smc |grep -i "CPU die temperature" | |
| # or thermal pressure: | |
| # sudo powermetrics -s thermal | grep "Current pressure" | |
| # ...or just install the "Hot" menubar app: | |
| # https://github.com/macmade/Hot |
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/bash | |
| if [ $# -eq 0 ]; then | |
| echo "This script can be used to transfer all files from a BaseSpace project " | |
| echo "Usage: $0 BaseSpaceProjectName" | |
| echo " Before running, be sure to log in to BaseSpace" | |
| echo " bs auth" | |
| echo " The CLI toolkits for bs can be found here and must be installed first:" | |
| echo " https://developer.basespace.illumina.com/docs/content/documentation/cli/cli-overview" | |
| exit 1 |
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/bash | |
| set -ex | |
| if [ $# -eq 0 ]; then | |
| echo "This script can be used to transfer all files from a DNAnexus project to a GS bucket (for Terra, etc.)" | |
| echo "Usage: $0 DNAnexus_project-id:/path/to/recurse gs://bucket/path [grep pattern_to_match; ex. ".tar.gz"]" | |
| echo " Before running, be sure to log in to both Google Cloud and DNAnexus via:" | |
| echo " dx login" | |
| echo " gcloud auth init" |
NewerOlder