Skip to content

Instantly share code, notes, and snippets.

@dperelman
dperelman / SansBullshitSans.ttx
Created Apr 3, 2015
SansBullshitSans.ttx file generated by ttx with behdad/fonttools master from official SansBullshitSans.ttf
View SansBullshitSans.ttx
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="utf-8"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="2.5">
<GlyphOrder>
<!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
<GlyphID id="0" name=".notdef"/>
<GlyphID id="1" name=".null"/>
<GlyphID id="2" name="nonmarkingreturn"/>
<GlyphID id="3" name="space"/>
@dperelman
dperelman / SansBullshitSans.ttx
Created Apr 3, 2015
SansBullshitSans.ttx file generated by ttx on Ubuntu with fonttools 2.4-1 from official SansBullshitSans.ttf
View SansBullshitSans.ttx
<?xml version="1.0" encoding="ISO-8859-1"?>
<ttFont sfntVersion="\x00\x01\x00\x00" ttLibVersion="2.4">
<GlyphOrder>
<!-- The 'id' attribute is only for humans; it is ignored when parsed. -->
<GlyphID id="0" name=".notdef"/>
<GlyphID id="1" name=".null"/>
<GlyphID id="2" name="nonmarkingreturn"/>
<GlyphID id="3" name="space"/>
<GlyphID id="4" name="exclam"/>
@dperelman
dperelman / ligature_xml_to_list.py
Created Mar 21, 2015
List ligatures in .ttx file.
View ligature_xml_to_list.py
#!/usr/bin/env python
# This takes in just the ligatures section of a .ttx file:
# USAGE: sed -n '/<LigatureSubst /,/<\/LigatureSubst>/p' FOO.ttx \
# | ./ligature_xml_to_list.py
from __future__ import print_function
import lxml.etree
import sys
View gist:d78e4897743f32e88a4b
#!/usr/bin/env python
from __future__ import print_function
import collections
import fileinput
import sys
plop = collections.defaultdict(list)
@dperelman
dperelman / blend.sh
Created Mar 8, 2015
Create simple slideshow video with blend effect between images.
View blend.sh
#!/bin/sh
# Need at least an outfile and two images for this command to make sense.
if [ $# -lt 3 ]
then
echo USAGE: "$0" OUTFILE IMAGES...
echo Create simple slideshow video with blend effect between images.
echo
echo OUTFILE is video file to create, .mkv extension is recommended.
echo IMAGES is a sequence of images for the slideshow.
@dperelman
dperelman / htoprc
Created Mar 5, 2015
My configuration for htop. Goes in ~/.config/htop/htoprc
View htoprc
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=47
sort_direction=1
hide_threads=0
hide_kernel_threads=0
hide_userland_threads=0
shadow_other_users=1
show_thread_names=0
@dperelman
dperelman / download_podcast.py
Last active Apr 27, 2018
Download all items in a podcast.
View download_podcast.py
#!/usr/bin/env python
from __future__ import print_function
import datetime
import feedparser
import time
import os
import sys
from six.moves import urllib
@dperelman
dperelman / ssh-reclaim
Last active Aug 29, 2015
Share an ssh-agent session among multiple shells on the same computer.
View ssh-reclaim
#!/bin/sh
# $Id$
#
# Limitations: if $ssh_auth_sock exists and an ssh-agent is running
# which doesn't use it, ssh-reclaim will be tricked into thinking
# that they correspond. This will happen if the computer shuts down
# uncleanly.
#
# Possible workarounds:
# * Check the command line of ssh-agent to see if we started it
You can’t perform that action at this time.