Skip to content

Instantly share code, notes, and snippets.

View chriszs's full-sized avatar

Chris Zubak-Skees chriszs

View GitHub Profile

Style Book

We're currently using the Chicago Manual of Style. It's imperfect, but it's better than the alternatives, so far.

Style Basics & Deviations From the Stylebook

  • We don't wrap article titles within text in quotes, but we do link to them on first usage
  • We don't italicize the names of publications in article text
  • We don't cap "The" in publication titles in article text, but we do in Organization entries
  • Commas and periods go inside closing quotation marks
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active September 15, 2024 20:33
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@onyxfish
onyxfish / README.md
Last active January 2, 2023 14:37
Google Spreadsheets script to generate slugs from a range of cells

This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.

Use it like this!

# A B C
1 a b slug
2 foo baz bing =slugify(A2:B4)
3 bar BAZ
4 FOO baz-bing
@briantjacobs
briantjacobs / storytelling_from_space.md
Last active August 28, 2024 07:14
Storytelling from Space

Storytelling from Space: Tools/Resources

This list of resources is all about acquring and processing aerial imagery. It's generally broken up in three ways: how to go about this in Photoshop/GIMP, using command-line tools, or in GIS software, depending what's most comfortable to you. Often these tools can be used in conjunction with each other.

Acquiring Landsat & MODIS

Web Interface

  • Landsat archive
@summer4096
summer4096 / fancyCanvas.js
Created November 29, 2014 20:20
Hill shading w/ leaflet!
L.tileLayer.fancyCanvas = function(url){
var layer = L.tileLayer.canvas({async: true});
layer.setUrl(url);
var dataSource = function(x, y, z, done){
var url = layer.getTileUrl({x: x, y: y, z: z});
d3.xhr(url).responseType('arraybuffer').get(done);
};
layer.data = function(fn){
dataSource = fn;
@clhenrick
clhenrick / get-bbls.py
Last active November 15, 2017 05:41
grab BBL numbers from a list of street addresses using the NYC Geo Client API
# Read CSV of rent stabilized properties and grab BBL from NYC's GeoClient API
# takes an input CSV file name and output CSV file name as argv
# first two columns of input csv must be address number and address name
# hardcoded for manhattan only, will update in the future
# run script by doing: python geo-client-api-test.py input.csv output.csv
from sys import argv
from nyc_geoclient import Geoclient
import csv
import json
@fivetentaylor
fivetentaylor / gist:9595d55a434c326bfd16
Created June 23, 2015 23:26
Streaming unzip of s3 resource back into s3
aws s3 cp s3://<bucket_name>/<resource>.gz - | pv | zcat | aws s3 cp - s3://<bucket_name>/<resource>
@apolloclark
apolloclark / Twitter API with Curl
Last active September 29, 2024 09:15
Twitter API with Curl
# create an account, create an app
# @see https://apps.twitter.com/
# retrieve the access tokens
# @see https://dev.twitter.com/oauth/reference/post/oauth2/token
# create the file ~/twitter_api
nano ~/twitter_api
Authorization: OAuth oauth_consumer_key="XXXXXX", oauth_nonce="11111111", oauth_signature="XXXXXX", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1450728725", oauth_token="99999-XXXXXX", oauth_version="1.0"
@themeteorchef
themeteorchef / format.js
Created January 22, 2016 14:47
RFC-822 formatting for Moment.js
// RFC-822 formatting string for Moment.js.
let timestamp = 'ddd, DD MMM YYYY hh:mm:ss';
// Note, the "z" character responsible for setting the three-character timezone for a date in Moment.js is now deprecated.
// An easy workaround for this is to generate your date/time using the string above, appending the timezone manually.
//
// e.g. return `${ timestamp } CST`;
//
// Here, "CST" would need to be calculated on your own and would likely be a variable unless timezone is fixed.
@migurski
migurski / Compare G-Econ.ipynb
Last active February 15, 2016 22:23
Testing Compare G-Econ.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.