Skip to content

Instantly share code, notes, and snippets.

Avatar

Eric Mill konklone

View GitHub Profile
@konklone
konklone / date differences in google spreadsheets.js
Created Apr 23, 2018
calculate date differences between two columns, for Google Apps Script / GSheets
View date differences in google spreadsheets.js
// 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];
View gist:3f8b8b2c3ac4dfee62af21ac2acd6021
https://docs.google.com/presentation/d/1R24Qb4J923qkswGnvThxprrvwGKEpBEF9MuLgZNkqLk/edit?usp=sharing
@konklone
konklone / house-senate-urls.py
Created Jan 14, 2017
House and Senate URL extractor, needs to be in unitedstates/congress-legislators' scripts/ dir
View house-senate-urls.py
#!/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()
View cat-food-dispenser.lua
-- 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 Jun 29, 2019 — forked from pzb/sample-chain1.txt
generate a self-signed root, issuing intermediate, and end entity certificate and private key
View cert.rb
#!/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 Sep 11, 2016
old script for cleaning up subdomain exports, used to be https://github.com/GSA/data/blob/subdomains/subdomains/clean.py
View 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.
View fec-api-workshop.md

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
fec open data workshop notes
View fec-api-workshop-notes.md
@konklone
konklone / hell yeah.md
Created Apr 18, 2016
scandinavian electronic music I have been listening to lately
You can’t perform that action at this time.