Skip to content

Instantly share code, notes, and snippets.

etes /
Created Apr 26, 2018 — forked from ansell/
Installing PostgreSQL 9.4 and PostGIS on Ubuntu 14.04

Remove old PostGIS Installation

The first step is to remove older version of PostGIS if any.

sudo apt-get purge postgis

Setup repository

wget --quiet -O - | sudo apt-key add -
sudo sh -c 'echo "deb trusty-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
etes /
Created Apr 4, 2018 — forked from rabbitt/
PostgreSQL schema cloner (including data).
import psycopg2 as pg
from io import BytesIO
from collections import defaultdict
from contextlib import contextmanager
etes / TileLayer.CloudMade.js
Created Oct 10, 2017 — forked from mourner/TileLayer.CloudMade.js
Basic CloudMade tile layer for Leaflet
View TileLayer.CloudMade.js
L.TileLayer.CloudMade = L.TileLayer.extend({
options: {
maxZoom: 18,
attribution: 'Map data &copy; 2011 <a href="">OpenStreetMap</a> contributors, <a href="">CC-BY-SA</a>, Imagery &copy; 2011 <a href="">CloudMade</a>'
initialize: function(key, styleId, options) {
var url = 'http://{s}{key}/{styleId}/256/{z}/{x}/{y}.png',
urlParams = {key: key, styleId: styleId || 997};
etes /
Created Mar 7, 2017 — forked from mhayes/
init.d for supervisord for Amazon Linux AMI
# Amazon Linux AMI startup script for a supervisor instance
# chkconfig: 2345 80 20
# description: Autostarts supervisord.
# Source function library.
. /etc/rc.d/init.d/functions
etes /
Created Mar 7, 2017 — forked from danmackinlay/
an init.d script for supervisord
#! /bin/sh
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
etes / supervisord-example.conf
Created Mar 7, 2017 — forked from didip/supervisord-example.conf
Example configuration file for supervisord.conf
View supervisord-example.conf
file=/tmp/supervisor.sock ; path to your socket file
logfile=/var/log/supervisord/supervisord.log ; supervisord log file
logfile_maxbytes=50MB ; maximum size of logfile before rotation
logfile_backups=10 ; number of backed up logfiles
loglevel=error ; info, debug, warn, trace
pidfile=/var/run/ ; pidfile location
nodaemon=false ; run supervisord as a daemon
etes /
Last active Oct 11, 2016
Install golang on ArmV6
tar -C /usr/local -xzf go1.7.1.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
etes /
Last active Jul 26, 2022
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

How to setup mount / auto-mount USB Hard Drive on Raspberry Pi

Follow the simple steps in the order mentioned below to have your USB drive mounted on your Raspberry Pi every time you boot it.

These steps are required especially if your are setting up a Samba share, or a 24x7 torrent downloader, or alike where your Raspberry Pi must have your external storage already mounted and ready for access by the services / daemons.

Step 0. Plug in your USB HDD / Drive to Raspberry Pi If you are using a NTFS formatted drive, install the following

#!/usr/bin/env python
Check that a particular email address exists.
Adam Blinkinsop <>
Checking email addresses in this way is not recommended, and will lead to
your site being listed in RBLs as a source of abusive traffic. Mail server
admins do like it when they get connections that don't result in email being
sent, because spammers often use this technique to verify email addresses.
# Some good references are:
#1. Install PostgreSQL postgis and postgres
brew install postgis
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start