Skip to content

Instantly share code, notes, and snippets.

View allain's full-sized avatar

Allain Lalonde allain

View GitHub Profile
@allain
allain / reset.sh
Last active October 7, 2017 21:12
reset all git commits to some time in the past
git reset --hard PASTCOMMIT
git reset --mixed CURRENTCOMMIT
git commit -m "Message about reversal"
@allain
allain / need.js
Last active October 7, 2017 03:07
use npmjs from the browser
console.log('installed: need, crave')
crave = m => fetch(`https://wzrd.in/bundle/${m}@latest/`)
.then(r => r.text())
.then(eval)
.then(() => require(m))
need = m => {crave(m).then(r => {
window[m] = r
console.log(`installed: ${m}`)
})}