Skip to content

Instantly share code, notes, and snippets.

View konklone's full-sized avatar

Eric Mill konklone

View GitHub Profile
@konklone
konklone / date differences in google spreadsheets.js
Created April 23, 2018 00:08
calculate date differences between two columns, for Google Apps Script / GSheets
// Subtracts two dates, formatted as e.g. 2025-04-10T12:46:10
// Author: Eric Mill, eric.mill@gsa.gov
// columns with notBefore and notAfter dates
var startField = "D";
var endField = "E";
var resultField = "F";
// first sheet
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheets()[0];
https://docs.google.com/presentation/d/1R24Qb4J923qkswGnvThxprrvwGKEpBEF9MuLgZNkqLk/edit?usp=sharing
@konklone
konklone / house-senate-urls.py
Created January 14, 2017 20:21
House and Senate URL extractor, needs to be in unitedstates/congress-legislators' scripts/ dir
#!/usr/bin/env python
import utils
import urllib
from utils import load_data, save_data
import io
import csv
def save_csv(header, rows, path):
output = io.StringIO()
-- The function get_name() should return a single string that is the name of the puzzle.
--
function get_name()
return "CAT FOOD DISPENSER"
end
-- The function get_description() should return an array of strings, where each string is
-- a line of description for the puzzle. Surrounding text with asterisks will cause it to
-- be rendered in bold, something we use when mentioning a signal by name.
--
@konklone
konklone / cert.rb
Last active June 29, 2019 13:07 — forked from pzb/sample-chain1.txt
generate a self-signed root, issuing intermediate, and end entity certificate and private key
#!/usr/bin/env ruby
# Forked from https://gist.github.com/pzb/84f867ed5a330093cfbf
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@konklone
konklone / clean.py
Created September 11, 2016 22:53
old script for cleaning up subdomain exports, used to be https://github.com/GSA/data/blob/subdomains/subdomains/clean.py
# -*- coding: utf-8 -*-
from sys import argv
import csv
import re
script, arg = argv
# Open the input raw subdomain list, the filtered output handle, and
# a file for likely-missing rows we'd like to take a second look at.

Intro to APIs at the FEC - May 2, 2016

An introduction to working with URLs, JSON, APIs, and open data -- without writing any code.

You will need

@konklone
konklone / fec-api-workshop-notes.md
Last active May 2, 2016 16:01
fec open data workshop notes
@konklone
konklone / hell yeah.md
Created April 18, 2016 01:12
scandinavian electronic music I have been listening to lately