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 alembic import op | |
from alembic.operations.ops import CreatePrimaryKeyOp, CreateForeignKeyOp | |
import sqlalchemy as sa | |
def upgrade(): | |
conn = op.get_bind() | |
ctx = op.get_context() | |
existing_metadata = sa.schema.MetaData() | |
target_metadata = ctx.opts['target_metadata'] |
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
for k in $(git branch | sed /\*/d); do | |
if [[ ! $(git log -1 --since='2 weeks ago' -s $k) ]]; then | |
git branch -D $k | |
fi | |
done |
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
document.getElementsByClassName('modal_signup_dialog')[0].parentNode.parentNode.remove(); document.body.style.overflow = 'scroll'; |
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
```json | |
users = [ | |
{ | |
"_id" : 1000, | |
"fb_id" : "a", | |
"username" : "", | |
/* user other fields */ | |
"posts" : [ | |
{ |
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
""" | |
Pacakge Name | |
------------- | |
Pacakge Description . | |
""" | |
from setuptools import setup | |
setup( | |
name='PACKAGE_NAME', |
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
[distutils] # this tells distutils what package indexes you can push to | |
index-servers = | |
pypi | |
pypitest | |
[pypi] | |
repository: https://pypi.python.org/pypi | |
username: your_username | |
password: your_password |
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
upstream project_name { | |
server unix:/web/nginx/sites/site-a.com/application/project_name/run/gunicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name projects.site-a.com; | |
client_max_body_size 4G; |
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 rm --cached filename | |
git update-index --assume-unchanged [path] |