Skip to content

Instantly share code, notes, and snippets.

@missinglink
missinglink / build.sh
Last active December 11, 2016 04:24
Pelias Build Script
#!/bin/bash
# Dependencies
for dep in 'git' 'wget' 'curl'; do
if [ ! `which $dep` ]; then
echo "$dep required, please install it and try again";
exit 1;
fi
done
@aaronlidman
aaronlidman / gist:2691527
Created May 14, 2012 02:55
ogr2ogr 900913
ogr2ogr [output] [input] -skipfailures -t_srs EPSG:900913 -clipsrc -180 -85.0511 180 85.0511
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@avalonalex
avalonalex / RSA.py
Last active March 6, 2021 10:46
A implementation of RSA public key encryption algorithms in python, this implementation is for educational purpose, and is not intended for real world use. Hope any one want to do computation like (a^b mode n) effectively find it useful.
#!/usr/bin/env python
import argparse
import copy
import math
import pickle
import random
from itertools import combinations
@zearen
zearen / JSONParser.hs
Created January 28, 2012 04:00
A simple haskell demonstation showing parsing JSON with Parsec
{-
Zachary Weaver <zaw6@pitt.edu>
JSONParser.hs
Version 0.1.1
A simple example of parsing JSON with Parsec in haskell. Note that
since the primary point of this excersize is demonstration,
Text.Parsec.Token was avoided to expose more of the grammar. Also,
complicated optimizations and shorcuts were avoided (mostly).