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 -e | |
set -x | |
upstream_repo=${upstream_repo:-CENSORED} |
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 | |
cd ~ | |
hostname=$(hostname -f) | |
if ! [ -d .git ]; then | |
git init | |
git remote add origin [email protected]:dfanjul/dotfiles.git | |
else | |
git remote set-url origin [email protected]:dfanjul/dotfiles.git |
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
$ cp .git/index .git/index2 | |
$ touch a | |
$ GIT_INDEX_FILE=.git/index2 git add a | |
$ GIT_INDEX_FILE=.git/index2 git write-tree | |
833db9db6007ba78fc3e5e10ccde7a1350bd6e1d | |
$ git commit-tree 833db9db6007ba78fc3e5e10ccde7a1350bd6e1d -p HEAD | |
foo | |
816a78f5fb38fddc4c05259e61c360f47425b1fb | |
$ d 816a78f5fb38fddc4c05259e61c360f47425b1fb | |
diff --git c/a w/a |
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
function factorial() { { echo 0; seq $1 | sed s/$/*/; echo p; } | dc; } |
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
alias xdebug='XRELEASE=0 && xstatus' | |
alias xrelease='XRELEASE=1 && xstatus' | |
alias xquiet='XVERBOSE=0 && xstatus' | |
alias xverbose='XVERBOSE=1 && xstatus' | |
alias xnoapk='XAPK=0 && xstatus' | |
alias xapk='XAPK=1 && xstatus' | |
if [ "$(uname)" = Darwin ]; then | |
XPROCS=$(sysctl -n hw.ncpu) | |
else | |
XPROCS=$(grep ^processor /proc/cpuinfo | wc -l) |
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
alias down='yes "" | head -$(($LINES - 2))' | |
alias down='seq $(($LINES - 2))' | |
alias down='yes "|" | head -$(($LINES - 3)) && echo v' | |
alias down='echo -e "\033[6n"; read -s -d R foo; lines=$((LINES - $(echo $foo | cut -d \[ -f 2 | cut -d \; -f 1) - 2)); while [ $lines -gt 0 ]; do echo \|; lines=$((lines - 1)); done; echo v' |
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 -x | |
alpha=$1 && shift || { echo "which alpha?"; exit 1; } | |
run() { | |
echo && echo "-> $*" | |
eval "$*" | |
} | |
hg-pull-and-deploy() { |
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 | |
# installation procedure: | |
# | |
#$ aptitude install qdbm-util | |
#$ { | |
# crontab -l | |
# echo '1 0 * * 1-5 [email protected] ~/bin/tgotd.sh' | |
#} | crontab |
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
*.go filter=gofmt | |
*.cgo filter=gofmt | |
*.docx diff=textutil |
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 config alias.backup \!$'rm -f ~/downloads/ice.bundle.git* && git bundle create ~/downloads/ice.bundle.git --all && par2create -n1 ~/downloads/ice.bundle.git && lftp downloads -e \'mput ~/downloads/ice.bundle.git* && exit\'' |
NewerOlder