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
| bibexport -o short.bib paper.aux | |
| #create bib file with only cited references |
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 names of files in last commit, remove name of folder, copy to dropbox folder (for git-agnostic) | |
| cp $(git show --name-only | grep pamf-workingcopy | sed 's/pamf-workingcopy\///g') ~/Dropbox/journalworkingcopy |
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
| for FILE in 50_p_* | |
| do | |
| sed -i 0,/52/"s/52 ..../52 $(( $( wc -l < $FILE ) -53 ))/" $FILE | |
| done | |
| #scan until first occurence of 52 http://stackoverflow.com/a/9453461/812817 | |
| #replace 52 .... with number of lines in FI minus 53 |
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
| #stop tracking file | |
| git update-index --assume-unchanged file.mod | |
| git ls-files -v | grep "^[[:lower:]]" | |
| # alias in git/config file: | |
| #[alias] | |
| # ignore = !git update-index --assume-unchanged | |
| # unignore = !git update-index --no-assume-unchanged | |
| # ignored = !git ls-files -v | grep "^[[:lower:]]" |
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
| #pretty print of tab-separated table ("less -S": do not wrap lines) | |
| column -t -s $'\t' -n < table | less -S | |
| sed -i "s/cap/c/g" *dat | |
| #-C: copy -n: try, but do not execute command. -W: simplified glob | |
| zmv -C -n -W 'comm*' '#comm*' | |
| #more complex stuff (standard syntax): | |
| zmv 'commodities_(*)_1.dat' '#commodities_$1_1.dat' |
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 build | |
| ../configure -C --with-cplex-lib="/opt/ibm/ibm/cplex/lib/x86-64_sles10_4.1/static_pic/libcplex.a -lpthread -lm" --with-cplex-incdir=/opt/ibm/ibm/cplex/include/ilcplex | |
| make | |
| make install |
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
| #Install rbenv and add it to .zshrc | |
| cd | |
| git clone git://github.com/sstephenson/rbenv.git .rbenv | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc | |
| echo 'eval "$(rbenv init -)"' >> ~/.zshrc | |
| git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
| source ~/.zshrc | |
| rbenv install 1.9.3-p0 | |
| rbenv local 1.9.3-p0 |
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
| Prerequisites: git and ruby (ruby --version must be >= 1.9.3) | |
| #git clone git://github.com/imathis/octopress.git octopress | |
| #cd octopress | |
| git clone <my-blog-source> | |
| cd blog-source | |
| gem install bundler | |
| rbenv rehash # If you use rbenv, rehash to be able to run the bundle command |
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
| #Find all occurrences of: | |
| # - multiple lines -> \_.* | |
| # - starting with ### -> ^### | |
| # - not greedily (first match) -> use "\{-\}" instead of "*" (Valid in Vim! Generally, you would use ".*?" for non-greedy behavior) | |
| # - ending with a @ | |
| # - and replace with a @ | |
| :%s/^###\_.\{-\}@/@/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
| sudo apt-get install nautilus-open-terminal | |
| cd ~/.gnome2/accels | |
| vi nautilus | |
| # Uncomment (remove semicolon) and add shortcut | |
| (gtk_accel_path "<Actions>/ExtensionsMenuGroup/NautilusOpenTerminal::open_terminal" "<Alt>n") |