Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am clj on github.
  • I am cljacobsen (https://keybase.io/cljacobsen) on keybase.
  • I have a public key ASDQU1UADl1bLGDhxBj1klafXt_JdQjo6h1A-rGVqEEY8wo

To claim this, I am signing this object:

@clj
clj / mk-icns.sh
Created October 13, 2017 23:44
Script to generate an OS X .icns file from an .svg file using the Inkscape cli
#!/usr/bin/env bash
###
# Adapted from: https://stackoverflow.com/a/20703594
###
if [ -z "${1+set}" ]; then
echo "Pass path to the inkscape command as first argument"
exit 1
fi
@clj
clj / MyPremailer.py
Created May 13, 2015 17:03
Premailer class that does not escape values in attributes
from lxml import etree
import premailer
class MyPremailer(premailer.Premailer):
def transform(self, pretty_print=True, **kwargs):
assert self.method == 'html'
parser = etree.HTMLParser()
stripped = self.html.strip()