http://www.cs.washington.edu/education/courses/cse451/10au/tutorials/tutorial_ctags.html
http://amix.dk/blog/post/19329
http://stackoverflow.com/questions/8285232/vim-set-ctags-in-vimrc
http://blog.dispatched.ch/2009/05/24/vim-as-python-ide/
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 add -p file.txt |
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
| # Local and remote branches with different names | |
| git checkout -b mybranch origin/remote_branch | |
| git push origin mybranch:remote_branch | |
| #There's a config option to tell git to push to remote tracking branches by default: | |
| git config --global push.default tracking | |
| #If with same name, push local branch to remote AND set it as upstream (push there by default) |
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-add-repository ppa:ubuntu-toolchain-r/test/ubuntu | |
| sudo apt-get update | |
| sudo apt-get install gcc-4.6 | |
| sudo apt-get install g++-4.6 |
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
| Yank to register: | |
| "+ y | |
| Indenting: | |
| v and then = (uniform the indentation) | |
| v and then < | |
| v and then > | |
| Tricks for indenting more than once without selecting everything again: |
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
| %http://en.wikibooks.org/wiki/LaTeX/Advanced_Mathematics#The_cases_environment | |
| \begin{cases} | |
| \exp{x} & \text{if } x \geq 0 \\ | |
| 1 & \text{if } x < 0 | |
| \end{cases} |
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
| # switch second and third field | |
| # input fields are separated either by "_" or by "\t" | |
| # output fields will be separated by " & " | |
| # add "\\" at end of line | |
| awk 'BEGIN {{FS="[_|\t]"}{OFS=" & "}} NR<=2{next} {ORS="\\\\\n"}{t=$2; $2=$3; $3=t; print;}' $1 > $1_full.tab |
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 pandas as pd | |
| from pylab import * | |
| import os | |
| [plot(x.timeCG,label=x.pricername.max()) for x in (pd.read_csv(l,"\t") for l in os.listdir('.') if l.endswith("nfo"))]; legend(); show() |
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
| #Check release (e.g., precise) | |
| lsb_release -c | |
| sudo echo "deb http://apt.postgresql.org/pub/repos/apt/ <release>-pgdg main" > /etc/apt/sources.list.d/pgdg.list | |
| #Authenticate repo | |
| wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install postgresql pgadmin3 | |
| # Then (http://blog.deliciousrobots.com/2011/12/13/get-postgres-working-on-ubuntu-or-linux-mint/) | |
| sudo -u postgres psql postgres |
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
| #Following for the most part the instruction in http://www.scipy.org/scipylib/building/linux.html#building-everything-from-source-with-gfortran-on-ubuntu-nov-2010 | |
| sudo apt-get install build-essential python-dev swig gfortran python-nose | |
| # If needed (check less /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor): | |
| sudo apt-get install cpufrequtils | |
| sudo cpufreq-set -c 0 -g performance #for each core, set freq scaling to performance | |
| mkdir BUILD | |
| cd BUILD |