Shortcut | Explanation |
---|---|
!! | Last command |
!:n | Last command’s nth argument |
!* | Last command’s arguments |
!$ | Last command’s last argument |
$_ | Last command’s last argument (stays in bash history) |
!:m-n | Last command’s mth through nth arguments |
!:n- | Last command’s nth through second-to-last arguments |
!:n-$ | Last command’s nth through last arguments |
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
set -g mouse on | |
set-option -g default-shell "/bin/bash" | |
set -g set-clipboard on | |
set-option -g history-limit 500000 | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g base-index 1 | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
run '~/.tmux/plugins/tpm/tpm' |
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 | |
# Show last 10 tags by creation date | |
git for-each-ref --sort=-creatordate refs/tags --format='%(refname:lstrip=2)' --count=10 |
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 ora from 'ora' | |
const spinner = ora({ | |
text:'Emoji', | |
spinner: { | |
frames: Array(76).fill(0).map((_,i) => String.fromCodePoint(128516+i)), | |
interval: 100 | |
} | |
}).start() |
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
Search: \.?(?<column>[\w_]+) as \k<column> | |
replace: .$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
changeBackground () | |
{ | |
gsettings set org.gnome.desktop.background picture-uri file://`ls /home/sam/Documents/Wallpapers/*.jpg | shuf -n 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
int GetWeekNumberOfMonth(DateTime date) | |
{ | |
date = date.Date; | |
DateTime firstMonthDay = new DateTime(date.Year, date.Month, 1); | |
return (date - firstMonthDay).Days / 7 + 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
{"lastUpload":"2019-08-30T20:08:34.891Z","extensionVersion":"v3.4.2"} |
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
slice-of-the-month () | |
{ | |
curl -s -L https://www.lucysnypizza.com/specials | grep --color=auto h2 | perl -pe 's/<[^>]*>//g' | perl -ne 'print if /slice.*month/i' | perl -pe 's/.*: (.+)$/$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
SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME IN ('column_name') AND TABLE_SCHEMA = 'table_name'; |
NewerOlder