Instantly share code, notes, and snippets.

View futureutils.scala
import java.util.concurrent.atomic.AtomicInteger
import scala.collection.generic.CanBuildFrom
import scala.concurrent._
import scala.util.{ Failure, Success }
* Enrichments for some useful Future combinators absent from the standard
* library.
View .ctags
--regex-groovy=/^[ \t]*package[ \t]+([a-zA-Z0-9.-_]+)/\1/p,package/
--regex-groovy=/^[ \t]*(private|public)?[ \t]*(abstract|final|static)?[ \t]*class[ \t]+([A-Za-z0-9_]+)/\3/c,class/
--regex-groovy=/^[ \t]*(private|public)?[ \t]*interface[ \t]+([A-Za-z0-9_]+)/\2/i,interface/
--regex-groovy=/^[ \t]*(private|public)?[ \t]*trait[ \t]+([A-Za-z0-9_]+)/\2/t,trait/
--regex-groovy=/^[ \t]*(private|public)?[ \t]*enum[ \t]+([A-Za-z0-9_]+)/\2/e,enum/
--regex-groovy=/^[ \t]*[(abstract|final|static) \t]*((def|void|byte|int|short|long|float|double|boolean|char|[A-Z][a-zA-Z0-9_]*)[ \t]+)?([a-zA-Z0-9_]+\(.*\))[ \t]+/~\3/m,package method/
--regex-groovy=/^[ \t]*public[ \t]+[(abstract|final|static) \t]*((def|void|byte|int|short|long|float|double|boolean|char|[A-Z][a-zA-Z0-9_]*)[ \t]+)?([a-zA-Z0-9_]+\(.*\))[ \t]+/+\3/m,public method/
--regex-groovy=/^[ \t]*protected[ \t]+[(abstract|final|static) \t]*((def|void|byte|int|short|long|float|double|boolean|char|[A-Z][a-zA-Z0-9_]*)[ \t]+)?([a-
View Itembase-Sandbox.postman_environment
"id": "d8ee1407-d7e2-60a3-f905-61896360d6e3",
"name": "Itembase – Sandbox",
"values": [
"key": "api_version",
"value": "v1",
"type": "text",
"name": "api_version",
"enabled": true
View mapfilter.go
package main
import "fmt"
type MapFunc func(interface{}) interface{}
type FilterFunc func(interface{}) bool
type Collection []interface{}
type User string
type Host string
View EventService.scala
import spray.http.DateTime
import spray.httpx.unmarshalling._
* Implicit allowing spray DateTimes to be deserialized from parameters directives.
* See:
// type FromStringOptionDeserializer[T] = Deserializer[Option[String], T]

Following are some resources referred to during the discussion, afterward in one-on-one chats, plus a few that I thought might be of interest for futher reading. As the panel turned out to be, these are mostly technical, with a few of interest to analyst types. I too wish that we had a bit more coverage of business case studies.

[Big Data: Principles and best practices of scalable realtime data systems][marz]

Nathan Marz and James Warren (Manning Publications)

A wealth of insight on building an architecture employing multiple data stores in order to serve differing latency requirements, and hedge risks and weaknesses. Marz initially developed Apache Storm for Backtype, acquired by Twitter. Still in "Early Access Edition" status, but all chapters are now available. If you're not technical but you'd like an introduction to the technical considerations, [Marz's post that led to the book][marz cap] is a briefer overview.

[Questioning the Lambda Architecture][kreps lambda]

View update-hipchat-hooks-event.rb
#!/usr/bin/env ruby
require 'netrc'
require 'octokit'
org_name = ARGV[0]
unless org_name
abort "Usage #{$0} org_name"
View snippet.js
// Create a queue, but don't obliterate an existing one!
var analytics = analytics || [];
(function () {
// A list of all the methods we want to generate queueing stubs for.
var methods = [
'identify', 'track', 'trackLink', 'trackForm', 'trackClick', 'trackSubmit',
'page', 'pageview', 'ab', 'alias', 'ready', 'group'
View ansible.rb
require 'formula'
class Ansible < Formula
homepage ''
url ''
sha1 '41672bf49ccdfcfe09a3614171a80e979304e071'
head '', :branch => 'devel'
depends_on :python => ['paramiko', 'jinja2']
View follow_observer_spec.rb
require 'spec_helper'
# Bustle is a pubsub system used for activity streams:
# Here when a person follows another (or a discussion, for instance), the observer wires
# up pubsub between them for future activity notifications. The Follow model knows nothing
# about the implementation choices for the pubsub system.
describe FollowObserver do
subject { FollowObserver.instance }