svn co <url> -r versionThe null device discards all data written to it but reports that the write operation has succeeded. Typically used for disposing of unwanted output streams of a process:
> /dev/nullIf the command uses the standard error:
> /dev/null 2>&1ls | wc -lsed -i -e 'string' filenamegrep -i pattern filefind / - type d -name "name"find /dir/ -name name*ln -s target_directory ./current_directoryhead filetail filemore filetar xvzf file.tar.gz
tar xvzf file.tgzchmod 744 fileFirst digit is owner permission, second is group and third is everyone. Calculate permission digits by adding numbers:
4 read
2 write
1 execute
To add GitHub colors to your terminal, just type:
git config --global color.ui auto
git clone [email protected]:user/repo.git
git clone git://project.url
git checkout #ofcommit
git checkout -b branchname
git push -u origin branch
When your branch my_branch is behind several commits with respect to other_branch, you can fast-forward it:
git checkout other_branch
git pull
git checkout my_branch
git push
Everytime I have to generate an SSH key I follow this. My only problem is that there is one step missing for me to work.
Before typing:
ssh-add ~/.ssh/id_rsa
you must type:
eval `ssh-agent -s`
Every time I create a repository on GitHub, I follow the instructions they provide. For example, for this repository:
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/KFubuki/useful_stuff.git
git push -u origin master
The only problem is that, from lxplus at least, git push -u origin master just doesn't work. If you have your SSH key configured, to solve this you just have to edit the .git/config file in your repo directory, and change:
url = https://github.com/KFubuki/useful_stuff.git
to:
url = ssh://[email protected]/KFubuki/useful_stuff.git
Kill all your jobs:
bkill -u username 0
latex example
bibtex example
latex example
latex example
dvips exampleimport py_compile
py_compile.compile("file.py")python -v
>>> import sys
>>> sys.path- Create it:
virtualenv venv
- Activate it:
cd venv
source bin/activate
- Install everything you need:
pip install -U setuptools
pip install -U pip
pip install numpy
pip install scipy
pip install matplotlib
pip install PySide
pip install ipython[all]
pip install patsy
pip install pandas
pip install sympy
pip install nose
pip install statsmodels
pip install zipline
pip install quandl
pip install scikit-learn
- Activate IPython:
ipython profile create
ipython notebook
- Close venv
deactivate
Convert your notebook to PDF:
ipython nbconvert notebookname.ipynb --to latex --post pdf
./make_six gfortran collimat
I always forget where it is: ~/.config/sublime-text-3/Packages.
To compare and show the diffs:
CTRL + k followed by CTRL + d.
To clear the marked lines:
CTRL + k followed by CTRL + c
Ctrl + Shift + F
In the search panel, you can customize the display of results with the following options:
Show in Separate Buffer/Output Panel
Show Context