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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| DOCSTRING | |
| """ | |
| from __future__ import print_function | |
| from __future__ import unicode_literals | |
| from __future__ import division |
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
| python3 -m venv ~/.virtualenvs/my-venv |
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
| rename -S .jpeg .jpg *.jpeg |
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
| # Makefile to simplify some common development tasks. | |
| # Run 'make help' for a list of commands. | |
| PYTHON=`which python` | |
| default: help | |
| help: | |
| @echo "Available commands:" | |
| @sed -n '/^[a-zA-Z0-9_.]*:/s/:.*//p' <Makefile | sort |
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
| openssl rand -base64 32 |
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
| ssh [[user]]@[[hostname]] | |
| mkdir .ssh | |
| chmod 700 .ssh | |
| exit | |
| cat ~/.ssh/id_rsa.pub | ssh [[user]]@[[hostname]] 'cat >> .ssh/authorized_keys' |
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
| jhead -autorot *.jpg |
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
| find . -name \*.html -type f -exec pandoc -f html -t markdown_strict -o {}.md {} \; |
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
| #!/usr/bin/env python | |
| """ | |
| CSV to TSV | |
| """ | |
| import csv | |
| import re | |
| def csv2tsv(csvpath, delimiter=',', quotechar='"', newdelimiter='\t'): |
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
| create table all_datatypes ( | |
| id int identity(1,1) not null | |
| ,bigint_field bigint | |
| ,binary_field binary(50) | |
| ,bit_field bit | |
| ,char_field char(10) | |
| ,date_field date | |
| ,datetime_field datetime | |
| ,datetime2_field datetime2(7) | |
| ,datetimeoffset_field datetimeoffset(7) |