This file contains 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
# crossplatform, poor compression, fast | |
zip -r archive_name.zip path/to/compress | |
# extract zip in current directory | |
unzip archive_name.zip | |
# compress with tar, poor compression, very fast | |
tar cvf archive_name.tar path/to/compress |
This file contains 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
# build source distribution | |
python setup.py sdist | |
# build wheel distribution | |
python setup.py bdist_wheel | |
# register with pypi test server | |
python setup.py register -r test | |
# configure your .pypirc |
This file contains 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
# copy remote directory to local directory | |
scp -r -P 22 user@your.server.example.com:/path/to/foo /home/user/Desktop/ |
This file contains 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
{ | |
"env": { | |
"GOPATH": "$HOME/Projekty/GO/dev/src", | |
} | |
} |
This file contains 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
@reboot /path/to/program >/dev/null 2>&1 |
This file contains 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
# coding=utf-8 | |
from sqlalchemy import Column, String, Integer, create_engine | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import sessionmaker, scoped_session | |
engine = create_engine('mysql://root@localhost/test') | |
Base = declarative_base() | |
This file contains 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
ps aux | grep -ie salt-master | grep -v grep | awk '{print $2}' | xargs kill -9 |
This file contains 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
{ | |
"color_scheme": "Packages/User/Tomorrow-Night.tmTheme", | |
"draw_white_space": "selection", | |
"find_selected_text": true, | |
"font_face": "Ubuntu Mono", | |
"font_options": | |
[ | |
"subpixel_antialias" | |
], | |
"font_size": 13.0, |
This file contains 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
download_pip: | |
cmd.run: | |
- name: "curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py" | |
- cwd: /tmp | |
- unless: "test -f /tmp/get-pip.py" | |
- require: | |
- pkg: curl | |
install_pip: | |
cmd.run: |
This file contains 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
SELECT string_agg(DISTINCT email, ',') FROM orders_order WHERE date_add >= '2013-12-20' |