Skip to content

Instantly share code, notes, and snippets.

View ungoldman's full-sized avatar
🤔
💭

Nate Goldman ungoldman

🤔
💭
View GitHub Profile
@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 / 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 / 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 / curl_post_json.md
Last active June 6, 2024 14:58
post a JSON file with curl

How do you POST a JSON file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@ungoldman
ungoldman / valueFromPath.js
Last active August 29, 2015 14:00
Get value in object from path as array of keys
var obj = {
a: {
b: {
c: 'yay'
}
}
};
var path = ['a','b','c'];
@ungoldman
ungoldman / index.html
Created August 7, 2014 01:22
Source of 8/6/2014 http://fdlp.gov hack
<body style="background-attachment: fixed;" vlink="red" alink="#ff0000" background="http://www.alfran.es/images/sowa.jpg" bgcolor="black" lang="EN-US" link="#646464"><p align="center">&nbsp;</p>
</object>
<html>
<head>
<SCRIPT language=JavaScript>
<!--
function clickhandler() {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ungoldman
ungoldman / burgerweek-data-2014.geojson
Last active August 29, 2015 14:05
PDX Burger Week Data 2014
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ungoldman
ungoldman / modal-template.html
Created September 15, 2014 20:48
sample angular directive modal implementation
<tailcoat-modal>
<tailcoat-modal-btn>Kill All Humans</tailcoat-modal-btn>
<tailcoat-modal-content>
<h2>Do you really want to kill all humans?</h2>
<button class="btn primary" ng-click="killAllHumans()">Yes</button>
<button class="btn cancel" ng-click="killAllHumans()">Definitely</button>
</tailcoat-modal-content>
</tailcoat-modal>