Skip to content

Instantly share code, notes, and snippets.


Ted Mielczarek luser

View GitHub Profile
# Filename :
# Authors : Georg Muntingh and Bjorn Lindeijer
# Version : 1.2
# Date : June 16, 2010
# Copyright : Public Domain
import os, sys, networkx
from PIL import Image
class TileMap:
luser /
Last active May 22, 2017 — forked from anonymous/
Zero-copy struct referencing with alignment checks
use std::borrow::Cow;
use std::mem;
use std::ptr;
use std::slice;
struct S {
pub x: u32,
luser / processed_crash_schema.json
Last active Jun 1, 2016 — forked from adngdb/processed_crash_schema.json
Socorro's Processed Crash Schema
View processed_crash_schema.json
"$schema": "",
"type": "object",
"description": "schema of a processed crash from Socorro",
"definitions": {
"frames": {
"type": "object",
"properties": {
"frame": {
"type": "integer",
luser /
Last active Jun 10, 2016 — forked from anonymous/
Rust enum with attached strings
use std::slice::Iter;
use std::collections::HashSet;
trait EnumValues : Sized {
fn values() -> Iter<'static, Self>;
macro_rules! simple_enum {
($name:ident { $(($item:ident, $repr:expr),)* }) => {
luser /
Created May 27, 2016 — forked from anonymous/
Shared via Rust Playground
use std::marker::PhantomData;
use std::boxed::Box;
trait Data {
fn get(&self) -> u32;
trait DataCreator {
fn new_data() -> Box<Data>;
def get(request):
debug_id = request.get('debug_id')
debug_filename = request.get('debug_filename')
if might_be_on_msdn(debug_id, debug_filename):
symbol_from_msdn = fetch_from_msdn(debug_id, debug_filename)
if not symbol_from_msdn:
raise PageNotFound()
new_s3_key = upload_to_symbols_m_o_S3(symbol_from_msd)
return PageOK(new_s3_key.absolute_url)
luser /
Last active Jan 3, 2018 — forked from dpk/
Quick-and-dirty IRCCloud log export tool
#!/usr/bin/env python3
# Run this like:
# <email> <password> <log directory>
import requests
import json
import sys
from collections import deque
from concurrent.futures import ThreadPoolExecutor as Pool
from datetime import datetime
# -*- 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): ",
import argparse
import fnmatch
import os
import string
import subprocess
import sys
from collections import defaultdict
View dump.c
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
int test(int x, int y) {
return x + y - x * y;
int end() {
return 0;