svn co <url> -r version
The 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/null
If the command uses the standard error:
> /dev/null 2>&1
ls | wc -l
sed -i -e 'string' filename
grep -i pattern file
find / - type d -name "name"
find /dir/ -name name*
ln -s target_directory ./current_directory
head file
tail file
more file
tar xvzf file.tar.gz
tar xvzf file.tgz
chmod 744 file
First 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 config --global core.editor "emacs"
export GIT_EDITOR=emacs
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 example
import 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
svn co svn+ssh://svn.cern.ch/reps/Sixtrack/trunk/Sixtrack --username ansantam