I hereby claim:
- I am davewalk on github.
- I am dw (https://keybase.io/dw) on keybase.
- I have a public key whose fingerprint is 685C 6EA6 9873 053B C256 451A DEB5 3CEF 3344 FDF6
To claim this, I am signing this object:
var tonerUrl = "http://{S}tile.stamen.com/toner/{Z}/{X}/{Y}.png"; | |
var url = tonerUrl.replace(/({[A-Z]})/g, function(s) { | |
return s.toLowerCase(); | |
}); | |
var basemap = L.tileLayer(url, { | |
subdomains: ['','a.','b.','c.','d.'], | |
minZoom: 0, | |
maxZoom: 20, |
I hereby claim:
To claim this, I am signing this object:
import pyproj | |
def convert(x, y): | |
state_plane = pyproj.Proj(init='epsg:2272', preserve_units=True) | |
wgs = pyproj.Proj(proj='latlong', datum='WGS84', ellps='WGS84') | |
lng, lat = pyproj.transform(self.state_plane, self.wgs, x, y) | |
return lat, lng |
import logging | |
from logging import handlers | |
logger = logging.getLogger() | |
# Change logging level here (CRITICAL, ERROR, WARNING, INFO or DEBUG) | |
logger.setLevel(logging.DEBUG) | |
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') | |
# Logging variables |
[login] | |
password = abc123 |
var util = require('util'), | |
fs =require('fs'); | |
// Print a nested object to the console for full inspection | |
console.log(util.inspect(data, showHidden=false, depth=16, colorize=true)); | |
// Print a thing to a file | |
fs.writeFile('debug.txt', aThing, function(err) { | |
if (err) console.log('Write error for some reason!'); | |
}); |
# Get the charset of a table | |
SELECT CCSA.character_set_name FROM information_schema.`TABLES` T, | |
information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA | |
WHERE CCSA.collation_name = T.table_collation | |
AND T.table_schema = "schemaname" | |
AND T.table_name = "tablename"; | |
# Get a bunch of details about a table including its collation | |
SHOW TABLE STATUS IN dbname like 'tablename' |
geoip_country /usr/share/GeoIP/GeoIP.dat; | |
map $geoip_country_code $allowed_country { | |
default no; | |
US yes; | |
} | |
geo $inNet { | |
default no; | |
10.0.0.0/8 yes; |
docker ps -a | grep "weeks ago" | awk '{print $1}' | xargs docker rm |
cat ip-ranges.json | jq '.prefixes' | jq '.[]' | jq '.service = "EC2"' | jq '.region = "us-east-1"' | jq '.ip_prefix' > ec2-us-east-1-ranges.txt |