Skip to content

Instantly share code, notes, and snippets.

@kylecronin
kylecronin / dedupe.py
Created May 13, 2011 18:08
Small one-off script I wrote to delete duplicate voice memos
import os
import hashlib
import re
files = {}
desiredname = re.compile("\d{8} \d{6}")
for filename in os.listdir("."):
h = hashlib.md5()
h.update(open(filename, 'r').read())
@kylecronin
kylecronin / critiqueme.md
Created August 22, 2011 18:51 — forked from VxJasonxV/critiqueme.md
A pending post to Meta.Stackoverflow

There is a blog post from Joel on the Stack Exchange blog around the time of WebApps' Area 51 Graduation:

A while ago, I wrote:

“Individually-branded sites felt more authentic and trustworthy. We thought that letting every Stack Exchange site have its own domain name, visual identity, logo, and brand would help the community feel more coherent. After all, nobody wants to say that they live in Housing Block 2938TC.”

Well, funny thing… that didn’t quite work out the way I expected... mostly because nobody could think of any good domain names. Believe it or not, “NothingToInstall” was one of the better suggestions. Ack.

This reasoning was used as justification for reverting "Nothing to Install" to "Web Applications", and maintaining graduating sites as "topic.stackexchange.com".

@kylecronin
kylecronin / itunes-xml-csv.rb
Created March 27, 2012 22:49
Quick and dirty script to get track names, artist names, and album names from an iTunes XML dump and output a CSV
require 'csv'
track = /<key>Name<\/key><string>(.*)<\/string>[.\s]*<key>Artist<\/key><string>(.*)<\/string>[.\s]*<key>Album<\/key><string>(.*)<\/string>/
file = File.open("Library.xml", "r")
contents = file.read
out = CSV.open("Library.csv", "w")
contents.scan(track) do |match|
@kylecronin
kylecronin / loader.rb
Created April 3, 2012 06:31
Downloads JSON from the SE API for use with Mathias' script
require 'open-uri'
require 'net/http'
require 'zlib'
users = [13, 58, 116, 181, 218, 219, 292, 638, 796, 1916, 1922, 2220, 2269, 3117,
3791, 3936, 4160, 4408, 4977, 5472, 6730, 7001, 7833, 8318, 9058, 9388, 9495,
10355, 10639, 11118, 11610, 11791, 12285, 13247, 13414, 14447, 14692, 15589,
16529, 17580, 17666, 18202, 18387, 20234, 20448, 20459, 20519, 20749]
@kylecronin
kylecronin / gist:2299374
Created April 4, 2012 07:01 — forked from ianchesal/gist:2288184
Calculate Winners for the Ask Different iPad Contest
#!/usr/local/bin/python
import json
import subprocess
from pprint import pprint
import time
import sys
import operator
# The Level 3 Crowd
@kylecronin
kylecronin / keybase.md
Created March 27, 2014 23:37
My Keybase Proof

Keybase proof

I hereby claim:

  • I am kylecronin on github.
  • I am kylecronin (https://keybase.io/kylecronin) on keybase.
  • I have a public key whose fingerprint is CC2A 6866 8FBC 0A36 3AF7 0C9B D7CC BEBF 44CE 53CE

To claim this, I am signing this object:

$ dig www.leancrew.com
; <<>> DiG 9.8.3-P1 <<>> www.leancrew.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35258
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2
;; QUESTION SECTION:
;www.leancrew.com. IN A