https://en.wikipedia.org/wiki/IOS_version_history
This file contains 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
github search operators | |
date format is: 2023-01-01 | |
repo | |
user:<username> | |
repo:<username>/<repository> | |
org:<organization> |
This file contains 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
# git-co | |
# git checkout whatever branch matches the passed-in substring | |
# | |
# Argument: | |
# substring to match | |
# | |
# Example: | |
# git-co sparkles # checks out the branch whose name contains the substring "sparkles" | |
# | |
# Will abort with an informative message and no action in various error scenarios. |
This file contains 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
function randomColor () { | |
# assuming 24-bit color | |
range_max=$((256 * 256 * 256)) | |
printf "%06x\n" $(((((RANDOM*RANDOM)+(RANDOM*RANDOM))+RANDOM)%range_max)) | |
} | |
# test | |
# $ for in in {0..99999}; do randomColor; done | sort | uniq | wc -l | |
# (should output a number roughly near 99700) |
This file contains 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 | |
export todo=() | |
for item in a b c; do | |
todo+=($item) | |
done | |
for item in "${todo[@]}"; do | |
echo got item [$item] | |
done |
This file contains 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
# change userid, remote ip address and name of keyfile as needed | |
# rasberry pi | |
pi-ssh () { ssh -l myuserid -i ~/.ssh/id_rasberrypi 192.168.3.141; } | |
pi-put () { scp -i ~/.ssh/id_rasberrypi $1 [email protected]:/home/myuserid/$2; } | |
pi-get () { scp -i ~/.ssh/id_rasberrypi [email protected]:/home/myuserid/$1 .; } | |
# beaglebone | |
bb-ssh () { ssh -l myuserid -i ~/.ssh/id_beaglebone 192.168.1.23; } | |
bb-put () { scp -i ~/.ssh/id_beaglebone $1 [email protected]:/home/myuserid/$2; } |
This file contains 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
jira() { | |
export jira_browse_url='https://jira.organization.domain/browse' | |
export ticket=$1 | |
if [[ "$ticket" == '' ]]; then | |
# for tickets of the form "XYZ-1234" | |
export ticket=`git branch | grep '*' | perl -ne 's/.*\/(\w+\-\d+)/$1/; print;'` | |
fi | |
open "$jira_browse_url/$ticket" | |
} |
This file contains 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
alias yt='unset PYTHONPATH; youtube-dl --recode-video mp4' |
This file contains 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 | |
export hash=$1 | |
if [[ "$hash" == '' ]]; then | |
echo usage: $0 '<git hash>' | |
exit -1 | |
fi | |
if git merge-base --is-ancestor $hash HEAD 2> /dev/null; then |
This file contains 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
845a512599e7b6f16b2562f4b366dff160075981f8c59c4269f4cc771755a3273f618cd5ba90bbd0649e460c27cabbd62ed9fa8d639054ab8075261fa63e8b80 |
NewerOlder