Skip to content

Instantly share code, notes, and snippets.

@martijnvanbeers
martijnvanbeers / country.py
Last active December 16, 2015 22:23
geoip mirror list
import GeoIP
import json
geo = GeoIP.new(GeoIP.GEOIP_MEMORY_CACHE | GeoIP.GEOIP_CHECK_CACHE)
with open('mirrors2.json') as data_file:
data = json.load(data_file)
@martijnvanbeers
martijnvanbeers / sg-luminosity-masks.scm
Last active November 22, 2015 20:10
luminosity masks rerevisited
; Create Luminosity Masks for an image
; Originally authored by Patrick David <patdavid@gmail.com>
; re-coded by Saul Goode to honor selection and layer offsets
; Will isolate light, mid, and dark tones in an image as channel masks
; Adapted from tutorial by Tony Kuyper (originally for PS)
; http://goodlight.us/writing/luminositymasks/luminositymasks-1.html
; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or