Skip to content

Instantly share code, notes, and snippets.

View daverau's full-sized avatar

Dave Rau daverau

View GitHub Profile
@daverau
daverau / setup-pi-zero.md
Last active September 21, 2017 14:15 — forked from gbaman/HowToOTGFast.md
Setup the Raspberry Pi Zero, fast!

Setup Pi Zero

Without external devices: no USB keyboard, mouse, or HDMI monitor are needed.

Requirements:

  1. Pi Zero (or W)
  2. MicroUSB cable
  3. MicroSD card
  4. An additional computer (I'm on a Mac)
// little js function to toggle between staging server and live production server. Nice for previewing differences between web environments.
(function(){
var staging = 'staging.site.com';
var live = 'www.site.com';
var a = location.href.split('/');
if (a[2] === live) {
a[2] = staging;
} else if (a[2] === staging) {
a[2] = live;
}