Skip to content

Instantly share code, notes, and snippets.

nyergler /
Created Oct 30, 2018
Multithreading with Lob's Python client & Python 3
import concurrent.futures
import urllib.request
import lob
lob.api_key = 'XXX'
'name': 'Larry Lobster',
'address_line1': '185 Berry St #6100',
nyergler / init.lua
Created May 21, 2018
My Hammerspoon window management configuration
View init.lua
hs.hotkey.bind({"cmd", "alt", "ctrl"}, "W", function()
"Hello World!",
textFont= "Comic Sans MS",
nyergler / whitespace.el
Created Jul 5, 2015
Whitespace like a civilized person
View whitespace.el
;; whitespace mode configuration
(require 'whitespace)
; make whitespace-mode use just basic coloring
(setq whitespace-style (quote
(spaces tabs newline tab-mark newline-mark face lines-tail)))
(setq show-trailing-whitespace 't)
(global-whitespace-mode 't)

Keybase proof

I hereby claim:

  • I am nyergler on github.
  • I am nyergler ( on keybase.
  • I have a public key whose fingerprint is 0C97 9219 A0B4 3AC4 A899 19C9 9861 12D1 5DE3 52C4

To claim this, I am signing this object:

class Twilio(object):
def send(self, message, to):
print "SMS '" + message + "' sent to " + to
class Email(object):
def send(self, message, to):
print "Email '" + message + "' sent to " + to
nyergler /
Created Apr 10, 2014
A string subclass that stores an encoding, easing interoperability between byte strings and Unicode strings.
Copyright (c) 2012-2014, Eventbrite and Contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
nyergler /
Created Sep 11, 2013
Use mock.patch to inspect calls to a method under test.
import collections
from mock import patch
MethodCall = collections.namedtuple(
nyergler / kenobi.el
Created Jul 28, 2013
Personal Emacs configuration for detecting virtual environments, adding egg directories, and allowing extra paths to be added to the Jedi auto-completion server.
View kenobi.el
(add-hook 'hack-local-variables-hook 'run-local-vars-mode-hook)
(defun run-local-vars-mode-hook ()
"Run a hook for the major-mode after the local variables have been processed."
(run-hooks (intern (concat (symbol-name major-mode) "-local-vars-hook"))))
(defun detect_buffer_venv (buffer-name)
(let ((buffer-dir (file-name-directory buffer-name)))
nyergler /
Created Jan 31, 2012
Convert maildirs (including subfolders) to mbox format
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Frédéric Grosshans, 19 January 2012
Nathan R. Yergler, 6 June 2010
This file does not contain sufficient creative expression to invoke
assertion of copyright. No warranty is expressed or implied; use at
your own risk.