Skip to content

Instantly share code, notes, and snippets.

View lindsaycarbonell's full-sized avatar
💛

Lindsay Carbonell lindsaycarbonell

💛
View GitHub Profile
var request = require("request"),
fs = require("fs"),
cheerio = require("cheerio"),
json2csv = require("json2csv"),
url = "https://www.wilkescc.edu/about-us/directory/?letter=";
var alpha = "abcdefghijklmnopqrstuvwxyz".toUpperCase().split("");
var all_emails = [],
first_names = [],
@thomaswilburn
thomaswilburn / index.js
Last active July 22, 2017 21:23
ASP page scraper with comments
// Built-in modules
var csv = require("csv");
var fs = require("fs");
var url = require("url");
// Loaded from NPM
var $ = require("cheerio"); // jQuery-like DOM library
var async = require("async"); // Easier concurrency utils
var request = require("request"); // Make HTTP requests simply
@jsvine
jsvine / SIPRI-arms-transfer.md
Created November 18, 2015 12:30
How to download SIPRI arms transfer data as a CSV file instead of a rich-text file.

The Stockholm International Peace Research Institute's Arms Transfers Database provides a tool to download the data. By default, that output is an .rtf rich-text file — not so easy to analyze with your favorite spreadsheet or statistics software. Luckily, getting a CSV of the data isn't very difficult. Here's how.

To get all transfers for 2014, by seller, run this command in your terminal:

curl http://armstrade.sipri.org/armstrade/html/export_trade_register.php --compressed \
    --data 'low_year=2014' \
    --data 'high_year=2014' \
    --data 'seller_country_code=' \
 --data 'buyer_country_code=' \
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 6, 2024 04:11
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jsvine
jsvine / draft.md
Created August 8, 2012 14:56
Why I love Tabletop.js but don't use it in production

Tabletop.js is a fantastic, open-source JavaScript library that lets developers easily integrate data from Google Spreadsheets into their online projects. I've used it, even contributed a minor feature, and love it for prototyping. Non-programmers love being able to update a project via Google Spreadsheets' hyper-intuitive interface.

That said, I'm extraordinarily wary of using Tabletop in production. Instead, at the Wall Street Journal, we use a bit of middleware to "prune" our Google Spreadsheets-based data and then cache it on our own servers. A few brief reasons: