Skip to content

Instantly share code, notes, and snippets.

zigg / index.js
Created May 31, 2016
express-winston res.end testcase
View index.js
'use strict';
const express = require('express');
const expressWinston = require('express-winston');
const stream = require('stream');
const winston = require('winston');
const app = express();
const requestLogger = new expressWinston.logger(({
zigg /
Created Nov 4, 2015
Create a DMG installer for installing El Capitan into a VM
# Based on Tim Sutton's from the excellent osx-vm-templates
# <>
hdiutil attach /Applications/Install\ OS\ X\ El\
hdiutil create -o tmp.dmg -size 10g -layout SPUD -fs HFS+J
hdiutil attach tmp.dmg
asr restore --source /Volumes/OS\ X\ Install\ ESD/BaseSystem.dmg --target /Volumes/untitled --erase
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -Rv /Volumes/OS\ X\ Install\ ESD/Packages /Volumes/OS\ X\ Base\ System/System/Installation/
cp -v /Volumes/OS\ X\ Install\ ESD/BaseSystem.* /Volumes/OS\ X\ Base\ System/
zigg /
Last active Jun 28, 2020
makes output on both stdout and stderr
# This script outputs "stdout" to stdout and "stderr" to stderr.
# Try it like this and observe the differences:
# 2>&1 >/dev/null
# >/dev/null 2>&1
# See <>
View 01.configure
checking build system type... x86_64-apple-darwin14.0.0
checking host system type... x86_64-apple-darwin14.0.0
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... darwin
checking for --without-gcc... yes
checking for gcc... clang
checking whether the C compiler works... no
configure: error: in `/private/tmp/python-50OT/Python-2.7.7':
View bots.rb
#!/usr/bin/env ruby
require 'twitter_ebooks'
# This is an example bot definition with event handlers commented out
# You can define as many of these as you like; they will run simultaneously"zigg_ebooks") do |bot|
# Consumer details come from registering an app at
# OAuth details can be fetched with
zigg / otr.txt
Last active Aug 29, 2015
OTR fingerprint
View otr.txt
Hash: SHA1
I am zigg on the Freenode IRC network (, and my
OTR fingerprint is A70E860E D07F0F4E 45AE0274 1F981806 8B3F562E.
Version: GnuPG v2
zigg / playbook.yml
Created Apr 1, 2014
First attempt to provision and configure a droplet with Ansible
View playbook.yml
# First attempt to provision and configure a Digital Ocean droplet
# using Ansible.
# After you run this the first time, you have to fill in the droplet
# id it prints into the id= parameter of the digital_ocean task. From
# there on out it's idempotent.
- hosts:
connection: local
gather_facts: False
zigg /
Created Mar 6, 2014 proof

Keybase proof

I hereby claim:

  • I am zigg on github.
  • I am zigg ( on keybase.
  • I have a public key whose fingerprint is E043 900F 94AF E80A 7633 65F4 AB46 823F CFBF 2B13

To claim this, I am signing this object:

zigg /
Created Jan 6, 2014
blocking read from gpg status-fd
#!/usr/bin/env python3.4
import os
import subprocess
fd_r, fd_w = os.pipe()
p = subprocess.Popen(
zigg /
Last active Jan 2, 2016
a client for /bin/cat in Python 3.4 asyncio
#!/usr/bin/env python3.4
import asyncio
class CatClient(asyncio.SubprocessProtocol):
"""meows at /bin/cat"""
You can’t perform that action at this time.