Skip to content

Instantly share code, notes, and snippets.

@pearofducks
pearofducks / zepto.smoothScroll.js
Last active September 11, 2017 17:08 — forked from benjamincharity/zepto.smoothScroll.js
(Actual) smooth scrolling with Zepto.js - with easing
function easeInOutQuart( t ) {
const t1 = t - 1
return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * t1 * t1 * t1 * t1
}
function smoothScroll(el, to, duration) {
var initial = $(window).scrollTop()
var dest = to - initial
var start = null
function step (timestamp) {
if (!start) start = timestamp
@pearofducks
pearofducks / docker-machine-vmfusion.sh
Created October 4, 2015 15:22
Basic workflow for docker-machine on Mac with VMWare Fusion
# Get everything ready on a Mac
brew install docker docker-machine docker-compose
# Create a new machine (based on the 1.8.1 boot2docker iso)
docker-machine create --driver vmwarefusion --vmwarefusion-memory-size 2048 --vmwarefusion-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.8.1/boot2docker.iso osxdock
# Bring the machine up
docker-machine start osxdock
# Configure Shell