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
| zmodload -i zsh/parameter | |
| insert-last-command-output() { | |
| LBUFFER+="$(eval $history[$((HISTCMD-1))])" | |
| } | |
| zle -N insert-last-command-output | |
| bindkey "^X^L" insert-last-command-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
| git for-each-ref --count=10 \ | |
| --sort=-committerdate refs/heads/ \ | |
| --format='%(refname) %(committerdate) %(authorname)' \ | |
| | sed 's/refs\/heads\///g' |
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
| cd ~/.vim; for submodule in `git submodule | grep -v core | awk '{print $2}'`; do | |
| echo "call janus#disable_plugin('`basename ${submodule}`')" >> ~/.vimrc.before; | |
| 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
| # pbcopy | |
| cat FILE | pbcopy | |
| ls | pbcopy | |
| # pbpaste | |
| pbpaste > NEW_FILE |
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
| gource -1280x720 --seconds-per-day 0.1 --key --hide dirnames, -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -crf 1 -threads 0 -bf 0 output.mp4 |
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
| var counter = 0, | |
| timer; | |
| timer = setInterval( function () { | |
| counter += 1; | |
| if (counter < 95221) { | |
| console.log(String.fromCharCode(counter)); | |
| } else { | |
| clearTimeout(timer); | |
| } |
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
| tell application "Google Chrome" | |
| reload active tab of window 1 | |
| end tell |
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
| // get a list of stashes | |
| git stash list | |
| // stash diff where the number is the index in the stash list | |
| git diff stash@{0} | |
| // stash@{0} is the default | |
| git diff stash |
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
| // num - number of items | |
| // start - starting point | |
| https://www.google.com/history/lookup?q=&output=rss&num=1000&start=0 | |
| // the first 1000 history items started from the 100th | |
| https://www.google.com/history/lookup?q=&output=rss&num=1000&start=100 |
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
| # Instead of Control-a, make the escape/command character be Control-x | |
| escape ^Xx | |
| # Autodetach session on hangup instead of terminating screen completely | |
| autodetach on | |
| # Turn off the splash screen | |
| startup_message off | |
| # Use a 30000-line scrollback buffer |