Skip to content

Instantly share code, notes, and snippets.

View giovaneliberato's full-sized avatar

Giovane Liberato giovaneliberato

View GitHub Profile
@giovaneliberato
giovaneliberato / brainfuck.py
Created May 27, 2013 23:45
Basic brainfuck interpreter written in python
salt = 65
def incr():
compiled[pointer] += 1
def decr():
compiled[pointer] -= 1
def fw():
global pointer
@springmeyer
springmeyer / degress2meters.js
Last active July 3, 2024 12:18
convert from long/lat to google mercator (or EPSG:4326 to EPSG:900913)
// See https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames for more details.
var degrees2meters = function(lon,lat) {
var x = lon * 20037508.34 / 180;
var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
y = y * 20037508.34 / 180;
return [x, y]
}
x= -77.035974