Skip to content

Instantly share code, notes, and snippets.

View danieltomasz's full-sized avatar

Daniel Borek danieltomasz

View GitHub Profile
@danieltomasz
danieltomasz / dotfiles.sh
Last active March 1, 2021 22:44
dotfiles
git init --bare $HOME/.dotfiles
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
dotfiles config --local status.showUntrackedFiles no
echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc
dotfiles status
dotfiles add .bashrc
dotfiles add .i3/config
dotfiles add .config/i3
dotfiles add .config/termite
@danieltomasz
danieltomasz / vsconfig
Created June 15, 2018 10:42
vscode powerline font for terminal
# patched from nerdfonts https://github.com/ryanoasis/nerd-fonts
"terminal.integrated.fontFamily": "'RobotoMono Nerd Font'"

Description

Use these commands to run a jupyter server on a remote server and access it locally in a browser. You must have SSH access to the browser. Use any port you want.

Do not forget to change username@server to the correct value!

TLDR

where using command
@danieltomasz
danieltomasz / uninstallpackage.sh
Created June 15, 2018 21:33
Uninstall package with dependencies
for dep in $(pip show python-neutronclient | grep Requires | sed 's/Requires: //g; s/,//g') ; do sudo pip uninstall -y $dep ; done
pip uninstall -y python-neutronclient
Source: http://stackoverflow.com/a/32698209/4828478
@danieltomasz
danieltomasz / subfolder-git
Created June 15, 2018 21:46
pull only subfolder from git repository
```
git init <repo>
cd <repo>
git remote add -f origin <url>
git config core.sparseCheckout true
echo "some/dir/" >> .git/info/sparse-checkout
echo "another/sub/tree" >> .git/info/sparse-checkout
````
@danieltomasz
danieltomasz / shelllcommands.md
Last active June 19, 2018 16:56
bash shortcuts
cd - # go to previuos directory
pushd level-1/level-2
# do work ...
popd 
# now we're back to the directory we started in
@danieltomasz
danieltomasz / virtualenv
Created June 16, 2018 12:02
moving python virtualenv
$ cd ~/first
$ virtualenv my-venv
$ grep 'VIRTUAL_ENV=' my-venv/bin/activate
VIRTUAL_ENV="/home/username/first/my-venv"
$ virtualenv --relocatable my-venv
Making script my-venv/bin/easy_install relative
Making script my-venv/bin/easy_install-2.7 relative
Making script my-venv/bin/pip relative
Making script my-venv/bin/pip2 relative
Making script my-venv/bin/pip2.7 relative
@danieltomasz
danieltomasz / jupyter_markdown_citations.md
Created June 19, 2018 15:41
making .bib references in jupyter notebook

Formatted Reference Links for Jupyter Notebooks based on .bib Files

Installation

This requires the bibtex-parser package also.

First, download the dependencies and package to the ~/.jupyter/custom location

@danieltomasz
danieltomasz / bobp-python.md
Created June 19, 2018 16:30 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@danieltomasz
danieltomasz / intalling.md
Created June 19, 2018 18:35
installing i3lock-color screensaver