Skip to content

Instantly share code, notes, and snippets.


Ted Mielczarek luser

View GitHub Profile
#!/usr/bin/env python
import bisect
import subprocess
import sys
def lookup(lib, find_addr):
funcs = {}
for line in subprocess.check_output(['readelf', '-s', lib]).splitlines():
line = line.strip()
luser / output.json
Created Mar 12, 2014
Sample stackwalker JSON output
View output.json
"crash_info" : {
"address" : "0x0",
"crashing_thread" : 0,
"type" : "SIGSEGV"
"crashing_thread" : {
"frames" : [
"file" : "",
import argparse
import fnmatch
import os
import string
import subprocess
import sys
from collections import defaultdict
luser / email_template
Last active Aug 29, 2015
Running group data mangler
View email_template
Hello Mozilla runners!
Mozlandia is nearly upon us, thanks for signing up for a running group! You've been placed in Group %(num)d, which is a distance of %(distance)s and an average pace of %(pace)s. This is all generated from a Python script, so consider it a helpful suggestion more than anything!
Your fellow runners in this group are all included in the To: line of this email. I'm hoping that you will be able to self-organize runs based on this, but if you need assistance feel free to stop into #running or email me directly. You can also use this etherpad I've created: if you want to make your outings available to anyone.
# -*- coding: utf-8 -*-
import os, sys
import urllib, urllib2
import json
import shutil
'title_prompt': "Search for a movie title (or type 'tv' to switch to TV Shows): ",
View gist:d65dc5d9bfedfbf30449
wchar_t name[32];
wcsprintf(name, "SaveGeckoProfile%d", pid)
HANDLE event = OpenEvent(EVENT_MODIFY_STATE, FALSE, name);
if (!event) {
return 1;
return 0;
import arrow
from datetime import datetime
from time import time
now = arrow.get(, 'US/Eastern')
print now
print now.timestamp
print now.isoformat()
now = arrow.get(time()).to('US/Eastern')
print now
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at
# ***** END LICENSE BLOCK *****
import copy
import os
import re
luser / test.dat
Created Feb 4, 2015 test data
View test.dat
luser /
Created Feb 12, 2015
moviepy gif loop finder
#!/usr/bin/env python
# Taken from
import os
import sys
import moviepy.editor as mp
from import FramesMatches
if len(sys.argv) != 2: