Skip to content

Instantly share code, notes, and snippets.

@evnm
evnm / indievc_webinar1.md
Last active Jul 20, 2017
indie.vc webinar: Bootstrapping—Lead Generation and Script Writing
View indievc_webinar1.md

Presenter: Nima Elyassi-Rad

Blog post

Notes

  • 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
evnm / datadog-iam-stack.yml
Last active Mar 5, 2019
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
http://docs.datadoghq.com/integrations/aws/#installation for
details.
Parameters:
DatadogAwsAccountId:
@evnm
evnm / README.md
Created Nov 11, 2015
README for a hypothetical stream-consumption command-line tool
View README.md

scat

A stream consumption tool.

Status: Vaporware

Why?

In 2015, stream-processing is the it-girl of software architecture. This sub-field is driven forward by a growing number of

@evnm
evnm / gist:d17336bf42e887c6e756
Created Jun 10, 2015
Script to convert milliseconds since epoch to a human-readable timestamp
View gist:d17336bf42e887c6e756
#!/usr/bin/python
import datetime
import sys
print datetime.datetime.fromtimestamp(float(sys.argv[1])/1000).strftime('%Y-%m-%d %H:%M:%S.%f')
@evnm
evnm / gist:31e4c5e4d37fb477b15c
Created Mar 10, 2015
A little script to generate new Scala+Maven projects
View gist:31e4c5e4d37fb477b15c
#! /bin/sh
#
# A little script to generate new Scala+Maven projects.
set -e
if test $# -lt 1; then
echo "usage: $0 <project name>"
exit 1
fi
@evnm
evnm / netty-ffc.md
Last active May 15, 2017
Preparatory notes for a Finagle Fight Club session on Netty.
View netty-ffc.md

Why is Netty necessary?

Deficiencies of raw NIO:

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

whiteboard example of Buffer.flip

java.nio.Buffer:

@evnm
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
esac
@evnm
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..."
$stdout.flush
@evnm
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
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
You can’t perform that action at this time.