Skip to content

Instantly share code, notes, and snippets.

View ungoldman's full-sized avatar
🤔
💭

Nate Goldman ungoldman

🤔
💭
View GitHub Profile
@ungoldman
ungoldman / callbacks.js
Created May 23, 2015 21:21
basic callback example
function first (input, callback) {
var output = input.reverse()
callback(output)
}
function second (output) {
console.log(output)
}
first([1,2,3], second)
@ungoldman
ungoldman / pdx-ftp-inventory.md
Created April 6, 2015 00:52
ftp02.portlandoregon.gov file inventory

These are the results of running the following command at the root of a copy of ftp://ftp02.portlandoregon.gov from 2015-03-31

find . -type f | rev | cut -d . -f1 | rev | sort | uniq -ic | sort -rn
17499 pdf
6807 jpg
3289 JPG
@ungoldman
ungoldman / CHANGELOG.md
Last active November 23, 2020 17:39
change log template

${project-name} Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

1.0.0

  • engage
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ungoldman
ungoldman / SHEPHERD.md
Last active April 7, 2017 00:12
some basic things every open source project should have
@ungoldman
ungoldman / output.txt
Last active August 29, 2015 14:11
rubying while true
~/dev/lab/ruby $ ruby rubying_while_true.rb
10/10 100.0% ██████████
9/10 90.0% █████████
8/10 80.0% ████████
7/10 70.0% ███████
6/10 60.0% ██████
5/10 50.0% █████
4/10 40.0% ████
3/10 30.0% ███
2/10 20.0% ██
@ungoldman
ungoldman / README.md
Last active August 29, 2015 14:10
geojson2csv w/ polygons

Getting polygons from GeoJSON to CSV

As of v0.1.1, geojson2csv doesn't work with polygons. Trying to figure out the best way to represent polygons in a CSV in the first place and ran into this issue.

See morganherlocker/geojson2csv#1

@ungoldman
ungoldman / service_or_factory.js
Last active August 29, 2015 14:10
angular service/factory patterns
angular.service('zoningLayer', function(){
var privateVariable = 'derp';
function privateFunction () {}
this.create = function() {
return new L.whatever(function(){
return {
fill: privateVariable(privateFunction),
@ungoldman
ungoldman / koop_roadmap_proposal.md
Last active August 29, 2015 14:08
koop roadmap proposal

Yay!

Koop is now deployable to Heroku.

But wait!

There are still some challenges remaining before koop can be more easily adopted.

<script src="https://rawgit.com/Esri/Terraformer/master/terraformer.js"></script>
<script src="https://rawgit.com/Esri/terraformer-arcgis-parser/master/terraformer-arcgis-parser.js"></script>
<!-- CDN or locally hosted is ideal but I'm using raw github so that we get error reporting within the unminified source
<script src="http://cdn-geoweb.s3.amazonaws.com/terraformer/1.0.4/terraformer.min.js"></script>
<script src="http://cdn-geoweb.s3.amazonaws.com/terraformer-arcgis-parser/1.0.4/terraformer-arcgis-parser.min.js"></script>
-->
<script>
var input = {
"objectIdFieldName" : "OBJECTID",
"globalIdFieldName" : "",