Skip to content

Instantly share code, notes, and snippets.

evnm / gist:d17336bf42e887c6e756
Created Jun 10, 2015
Script to convert milliseconds since epoch to a human-readable timestamp
View gist:d17336bf42e887c6e756
import datetime
import sys
print datetime.datetime.fromtimestamp(float(sys.argv[1])/1000).strftime('%Y-%m-%d %H:%M:%S.%f')
evnm / datadog-iam-stack.yml
Last active Apr 28, 2021
A CloudFormation template describing an IAM policy+role pair which grants cross-account read access for monitoring AWS infrastructure in Datadog
View datadog-iam-stack.yml
AWSTemplateFormatVersion: "2010-09-09"
Description: Creates a stack containing an IAM role used to grant
Datadog monitoring access to AWS infrastructures. See for
evnm / FuturePool'd
Last active Aug 8, 2018
Comparing approaches to convert `java.util.concurrent.Future`s to `com.twitter.util.Future`s.
View FuturePool'd
import com.twitter.util.{Future => TwitterFuture, FuturePool}
import java.util.concurrent.{Future => JavaFuture}
* Convert a Java Future to a Twitter Future.
def javaFutureToTwitterFuture[A](javaFuture: JavaFuture[A]): TwitterFuture[A] =
FuturePool.unboundedPool { javaFuture.get }
evnm / brew-install-missing-unix-tools
Created Oct 24, 2011
A brew command to install useful tools missing from Mac OS X
View brew-install-missing-unix-tools
# Legitimately-useful utilities missing from OS X.
brew install wget watch gnu-sed coreutils
# Up-to-date versions of included tools.
brew install git emacs
# Just for fun.
brew install fortune cowsay
evnm /
Last active Jul 20, 2017 webinar: Bootstrapping—Lead Generation and Script Writing

Presenter: Nima Elyassi-Rad

Blog post


  • Lead-gen flow: Prospect -> Lead -> Sales Qualified Lead (SQL) -> Customer
  • Research:
    • Why are you in business?
    • Exactly who are you helping?
    • What specifically are you doing for them?
evnm /
Last active May 15, 2017
Preparatory notes for a Finagle Fight Club session on Netty.

Why is Netty necessary?

Deficiencies of raw NIO:

  • complicated APIs
  • Too low-level to be productive for application development.

whiteboard example of Buffer.flip


evnm / vertical-split-screen-patch
Created Dec 31, 2010
CLI example of patching GNU Screen to support vertical window splitting
View vertical-split-screen-patch
$ cvs -z3 co screen
$ curl > gnu-screen-vertsplit.patch
$ cd screen/src
$ patch < ../../gnu-screen-vertsplit.patch
$ ./configure --enable-locale --enable-telnet --enable-colors256 --enable-rxct_osc
$ make
$ sudo make install
evnm / gcb
Last active Dec 29, 2015
A fuzzy `git checkout`.
View gcb
#! /bin/sh
# A fuzzy `git checkout`.
match=`git rev-parse --abbrev-ref --branches="*$1*"`
case `wc -w <<< "$match" | tr -d ' '` in
"0") echo "error: '$1' did not match any branch." 2>&1 ;;
"1") git checkout $match ;;
*) echo "error: '$1' is ambigious among:\n$match" 2>&1
evnm / test_changed
Last active Dec 28, 2015
A Ruby script that runs tests with Pants for all projects that have been modified in the current working tree.
View test_changed
#!/usr/bin/env ruby
# Run tests for all projects that have been modified in the Birdcage,
# relative to HEAD.
# For example, if you've edited files in three projects, this script will
# run tests serially for these three projects in one command.
print "Determining which files have been changed..."
evnm / gitm
Last active Dec 21, 2015
A Git maintenance script. Prunes remote-tracking branches on origin and performs a deep repack on the repository.
View gitm
#! /bin/sh
# A Git maintenance script.
set -e
root=`git rev-parse --show-toplevel`
echo "Performing maintenance tasks on Git repository in ${root}..."
git fetch
git remote prune origin
git repack -a -d --depth=250 --window=250