Skip to content

Instantly share code, notes, and snippets.

View .gitignore
# .gitignore file for Xcode5
# NB: if you are storing "built" products, this WILL NOT WORK,
# and you should use a different .gitignore (or none at all)
# This file is for SOURCE projects, where there are many extra
# files that we want to exclude
# For updates, see:
# and
View launch_sublime_from_terminal.markdown

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\

You can find more (official) details about subl here:


View intall GDAL on
# You will need to run these with superuser permissions.
# Either prefix `sudo` to all commands, or switch user
# Be very careful when you switch user
sudo su - root
# Update all the packages
yum update
# Install the basics - python27, gcc, svn, git, httpd, make, uuid
mobilestack / install onavo
Last active Sep 16, 2016
View install onavo 这里去找链接,输入到safari即可,即使没有下载onavo软件也可以 这里去配置
mobilestack / postgresql id_seq
Last active Aug 14, 2018
postgresql id_seq reset
View postgresql id_seq

SELECT MAX(id) FROM your_table; SELECT nextval('your_table_id_seq'); SELECT setval('your_table_id_seq', (SELECT MAX(id) FROM your_table));

mobilestack / proj installation on
Last active Aug 29, 2015
proj.4.8.0 install failure on Linux
View proj installation on

to add --without-jni, so it is

./configure --prefix=/home1/username/proj --without-jni

in the downloaded and extracted proj file.

Then when installing Postgis on Bluehost, just download postgis and run inside the extracted file folder:

mobilestack / gdal geos for python33 on Windows7
Last active Aug 29, 2015
Install Gdal for Postgis on Windows7, x64, Python3.3
View gdal geos for python33 on Windows7

I am developing a Django site and my development machine uses Windows7, X64, since Postgis is more or less the best option, I decided to migrate my database from sqlite3 to Postgresql, and on production side, migrating Mysql to Postgresql.

So on development side, I install the Postgresql from a binary installer, which includes an optional Postgis extension for intallation. Although it says Gdal is included, but my Python3.3 just cannot find it. If I test it in Python:

from osgeo import gdal


from django.contrib.gis import gdal

Learning python/django

In my quest to learn how to use python within the django framework, the most difficult thing was the development environment, and getting to the point where I could play learn, practice and experiment. Here are some steps that I took to get to that point.

I’ll add to this as I can, but mostly I’m using it as a handy resource that I can access while continuing to learn.


Cribbed from my notes and this blog post.