Skip to content

Instantly share code, notes, and snippets.

View ungoldman's full-sized avatar
🤔
💭

Nate Goldman ungoldman

🤔
💭
View GitHub Profile
@ungoldman
ungoldman / mutlnomah.json
Last active August 29, 2015 14:00
Multnomah County Voting Precincts (2013)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ungoldman
ungoldman / bootlet.html
Last active August 29, 2015 13:58
Bootlet Leafstap 3.0
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Leafstrap</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css">
<style>
#map {
height: 400px;
@ungoldman
ungoldman / tinystore.js
Last active March 9, 2016 02:04
Tiny localStorage wrapper (moved to https://github.com/ngoldman/tinystore)
function TinyStore (name) {
this.enabled = (function(){
try {
return 'localStorage' in window && window['localStorage'] !== null;
} catch (e) {
return false;
}
})();
this.session = {};
@ungoldman
ungoldman / index.js
Created February 28, 2014 21:31
requirebin sketch
var Terraformer = require('terraformer')
var point = new Terraformer.Point({
type: 'Point',
coordinates: [-122.677425, 45.521637]
})
var res = point.toMercator()
document.documentElement.innerHTML = res.coordinates
@ungoldman
ungoldman / rad_tricks.md
Created February 21, 2014 08:52
Rad tricks from a past life

rad tricks

MySQL

Raddest db since like forever (not)

just dump it

@ungoldman
ungoldman / js_package_release.md
Last active December 28, 2015 19:59
Release You A Package

JS Release Steps

build

  1. lint, test
  2. bump versions in all relevant places
    • package.json, bower.json, banners, docs
  3. build

github release

@ungoldman
ungoldman / findLocalItems.js
Last active November 20, 2020 04:05
how to filter keys from localStorage with a regex
// returns an array of localStorage items in key/value pairs based on a query parameter
// returns all localStorage items if query isn't specified
// query can be a string or a RegExp object
function findLocalItems (query) {
var i, results = [];
for (i in localStorage) {
if (localStorage.hasOwnProperty(i)) {
if (i.match(query) || (!query && typeof i === 'string')) {
value = JSON.parse(localStorage.getItem(i));
@ungoldman
ungoldman / dokku_setup.md
Last active November 28, 2023 12:35
Deploy your own PaaS: Setting up Dokku with DigitalOcean and Namecheap

Deploy your own PaaS!

Setting up Dokku with DigitalOcean and Namecheap

..or how I made my own heroku in a few hours for $3.98.


This write-up is several years out of date! You probably shouldn't use it.

@ungoldman
ungoldman / r_notes.md
Created October 20, 2013 20:06
R Notes