Skip to content

Instantly share code, notes, and snippets.

View nychng's full-sized avatar

Nai nychng

  • Singapore
View GitHub Profile
@khanlou
khanlou / UIImageView+Network.h
Last active June 9, 2020 07:34
Quick and dirty UIImageView with networking
//
// UIImage+Network.h
// Fireside
//
// Created by Soroush Khanlou on 8/25/12.
//
//
#import <UIKit/UIKit.h>
@fcurella
fcurella / django_postgis_on_os_x.md
Created July 27, 2012 15:22
Django and Postgis on OS X

Django and Postgis on OS X

Install Homebrew

Install a few things with homebrew:

Notice that some packages give you information at the end, read it carefully. To recall that info use brew info like this: $ brew info postgresql

$ brew install python --universal
@evildmp
evildmp / gist:3094281
Last active June 30, 2023 10:55
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@ibarovic
ibarovic / forms.py
Created July 11, 2012 20:00
django crispy forms and django inline forms example (inlineformset_factory)
class AuthorForm(ModelForm):
def __init__(self, *args, **kwargs):
self.helper = FormHelper()
self.helper.form_tag = False
self.helper.layout = Layout(
Field('name'),
)
super(AuthorForm, self).__init__(*args, **kwargs)
class Meta:
model = Author
@huyng
huyng / matplotlibrc
Created February 8, 2011 15:50
my default matplotlib settings
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
# (win32 systems).
@vinilios
vinilios / install xapian inside virtualenv
Created October 1, 2009 14:53
xapian local installation
apt-get install zlib1g-dev
apt-get install g++
export VENV=$VIRTUAL_ENV
mkdir $VENV/packages && cd $VENV/packages
curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-core-1.0.16.tar.gz
curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-bindings-1.0.16.tar.gz
tar xzvf xapian-core-1.0.16.tar.gz