Skip to content

Instantly share code, notes, and snippets.

View gatsbyz's full-sized avatar
💭
sup dawg

Jesse Lee gatsbyz

💭
sup dawg
View GitHub Profile
@rochacbruno
rochacbruno / haversine.py
Created June 6, 2012 17:43
Calculate distance between latitude longitude pairs with Python
#!/usr/bin/env python
# Haversine formula example in Python
# Author: Wayne Dyck
import math
def distance(origin, destination):
lat1, lon1 = origin
lat2, lon2 = destination
@kimmobrunfeldt
kimmobrunfeldt / node-exports-styles.js
Last active July 1, 2023 18:39
A few Node module export styles. 1 seems to be the most used and I prefer it
// Style 1
// Export all manually
// Good: Calling functions inside the module is convenient
// Bad: module.exports becomes verbose and it's tedious to add new functions
function a() {
b()
}
@rms80
rms80 / grab_latest_submodules.bat
Created November 10, 2017 19:17
update each submodule to most recent commit to master branch
REM grab latest commits from server
git submodule update --recursive --remote
REM above command will set current branch to detached HEAD. set back to master.
git submodule foreach git checkout master
REM now do pull to fast-forward to latest commit
git submodule foreach git pull origin master