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
set autoindent | |
filetype indent on | |
filetype on | |
:set nu | |
syntax on | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
set smarttab |
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
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose |
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
synclient TouchpadOff=2 | |
synclient TouchpadOff=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
.row { | |
display: table; | |
} | |
[class*="col-"] { | |
float: none; | |
display: table-cell; | |
vertical-align: top; | |
} |
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
__pycache__ | |
*.py[cod] | |
*.py~ |
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
Replace traditional index manipulation with Python’s core looping idioms. | |
Learn advanced techniques with for-else clauses and the two argument form of iter(). | |
Clarify function calls with keyword arguments. | |
Tuple packing and unpacking | |
Don’t under‐estimate the advantages of updating state variables at the same time. It eliminates an entire class of errors due to outof-order updates. It allows high level thinking: “chunking”. | |
Decorators and Context Managers | |
Helps separate business logic from administrative logic. Clean, beautiful tools for factoring code and improving code reuse. Good naming is essential. |
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
from fabric.contrib.files import append, exists, sed | |
from fabric.api import env, local, run | |
from os import path | |
import random | |
REPO_URL = 'https://github.com/username/repo.git' | |
SITES_FOLDER = '/home/username/sites/' | |
PROJECT_NAME = 'projectName' | |
def deploy(): |
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
$ mysql -h host -u user -p | |
mysql> CREATE DATABASE dbname; | |
mysql> USE dbname | |
mysql> GRANT USAGE ON *.* TO dbuser@localhost IDENTIFIED BY 'password'; | |
mysql> GRANT ALL PRIVILEGES ON dbname.* TO 'dbuser'@'localhost'; | |
mysql> quit |
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
$ virtualenv venv | |
$ source venv/bin/activate | |
$ pip install funfactory | |
$ funfactory --python=2.7 --pkg=blog | |
create mysql database | |
add to blog/settings/local.py |
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
$ git init | |
$ git add . | |
$ git commit -m "initial commit" | |
$ git remote add origin [email protected]:bjdixon/project_name.git | |
$ git push -u origin master |
OlderNewer