Skip to content

Instantly share code, notes, and snippets.

View andburn's full-sized avatar

Andrew Burnett andburn

View GitHub Profile
@andburn
andburn / icomoon_refs.py
Created February 24, 2017 11:03
Parse IcoMoon font reference file to C# unicode strings
from lxml import html
with open("reference.html", "r") as f:
data = f.read()
tree = html.fromstring(data)
divs = tree.xpath("//div[contains(@class, 'glyph')]")
defs = []
for d in divs:

Keybase proof

I hereby claim:

  • I am andburn on github.
  • I am andburn (https://keybase.io/andburn) on keybase.
  • I have a public key whose fingerprint is DC49 A3FB DB6D 1B42 F61A D7F5 EB98 61AB 7FAA B8AB

To claim this, I am signing this object:

@andburn
andburn / cardmap.py
Created February 16, 2016 19:36
Hearthstone card art mapping using hearthsim/python-unitypack
#!/usr/bin/env python
import os
import sys
import glob
import json
import unitypack
from PIL import ImageOps
def get_output_path(filename):
basedir = "out"
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.IO;
namespace S16.Drawing
{
#region DDSImage Class