- airbnb/caravel flask
- airbnb/airflow flask
- reddit/reddit-mobile react
- khan/perseus react
- mozilla/payments-ui react
- webbylab/itsquiz-wal react
- getsentry/sentry django, react
- relax/relaxreact, redux
- Hylozoic/hylo-redux react, redux
- adobe-platform/feature-flipper react, AWS Lambda, API Gateway, DynamoDB
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
mkdir repo-name.git | |
cd repo-name.git | |
git --bare init | |
cd /path/to/existing/repo | |
git push /path/to/repo-name.git branch-to-move:master | |
# Add remote | |
cd /path/to/repo-name.git | |
git remote add origin https://github.com/username/repo-name.git |
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
sudo -i | |
cd | |
apt-get install build-essential checkinstall -y | |
apt-get build-dep imagemagick -y | |
apt-get install libwebp-dev -y | |
wget http://www.imagemagick.org/download/ImageMagick-6.9.5-8.tar.gz | |
tar xzvf ImageMagick-6.9.5-8.tar.gz | |
cd ImageMagick-6.9.5-8/ | |
./configure | |
make |
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
#!/bin/bash | |
usage () | |
{ | |
cat <<UsageHERE | |
boot2docker-fwd -- Helper function to quickly manage port forwards between the boot2docker-vm and the host | |
Usage: boot2docker-fwd [ -n RULE_NAME ] [ -h HOST_PORT ] [ -p {tcp|udp} ] [ -i HOST_IP ] GUEST_PORT | |
or boot2docker-fwd -d RULE_NAME | |
or boot2docker-fwd -l | |
or boot2docker-fwd -A |
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
# Code from Mikko Hellsing: | |
# http://www.robgolding.com/blog/2010/05/03/extending-settings-variables-with-local_settings-py-in-django/#comment-51863642 | |
def get_setting(setting): | |
import settings | |
return getattr(settings, setting) | |
INSTALLED_APPS = get_setting('INSTALLED_APPS') + ('debug_toolbar', ) | |
MIDDLEWARE_CLASSES = get_setting('MIDDLEWARE_CLASSES') + ('debug_toolbar.middleware.DebugToolbarMiddleware',) | |
INTERNAL_IPS = ('127.0.0.1',) |
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
sudo apt-get install libtool automake | |
git clone --depth 1 git://git.cairographics.org/git/py2cairo | |
cd py2cairo | |
./autogen.sh --prefix=/path/to/virtual/env | |
make | |
make install |
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
apt-get install python-pygraphviz | |
pip install django-extensions | |
# add 'django_extensions' to INSTALLED_APPS in settings.py | |
python manage.py graph_models -a -o myapp_models.png |
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
# I ran into a problem when I was trying to import cairo installed into virtualenv | |
# | |
# >>> import cairo | |
# Fatal Python error: PyThreadState_Get: no current thread | |
# Abort trap: 6 | |
# After extensive search I found possible source of the problem. When installing py2cairo from source code waf | |
# builder links .so file to a wrong version of Python: | |
# $ otool -L ./build_directory/src/_cairo.so | |
# ./build_directory/src/_cairo.so: |
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
brew install freetype | |
brew install pkg-config | |
PKG_CONFIG_PATH=/usr/local/bin/pkg-config pip install matplotlib |
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
import sys | |
import os | |
import codecs | |
import unicodedata as ud | |
# from http://stackoverflow.com/questions/3094498/how-can-i-check-if-a-python-unicode-string-contains-non-western-letters | |
latin_letters = {} | |
NewerOlder