Skip to content

Instantly share code, notes, and snippets.

View bbouffaut's full-sized avatar

Baptiste Bouffaut bbouffaut

View GitHub Profile
@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
@KartikTalwar
KartikTalwar / Documentation.md
Last active June 25, 2024 10:55
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@andreif
andreif / ftpserver.py
Last active November 15, 2021 01:03 — forked from scturtle/ftpserver.py
Simple FTP server in Python 2
# coding=utf-8
import os
import socket
import threading
import time
import traceback
import requests
def make_path(*parts):