Skip to content

Instantly share code, notes, and snippets.

View zackangelo's full-sized avatar

Zack Angelo zackangelo

View GitHub Profile
@zackangelo
zackangelo / TracingExecutionContext.scala
Created December 6, 2016 01:28
Executor that propagates Brave tracing context
package com.bigcommerce.core.metrics.tracing
import com.github.kristofa.brave.{ServerSpan, ServerSpanThreadBinder}
import scala.concurrent.ExecutionContext
/**
* Created by zack.angelo on 12/5/16.
*/
class TracingExecutionContext(wrapped:ExecutionContext,
@zackangelo
zackangelo / configure.rb
Created March 14, 2013 21:57
Redis cookbook
include_recipe 'redis'
Chef::Log.debug('Writing Redis configuration file...')
template "/etc/redis.conf" do
source "redis.conf.erb"
owner "root"
group "root"
mode "0644"
notifies :restart, resources(:service => "redis"), :delayed
@zackangelo
zackangelo / ember-master.js
Created January 7, 2013 05:46
Ember.js latest master
// Version: v1.0.0-pre.2-311-g668783a
// Last commit: 668783a (2013-01-06 21:10:55 -0800)
(function() {
/*global __fail__*/
/**
Ember Debug
@zackangelo
zackangelo / ember-master-min.js
Created January 7, 2013 05:42
Ember.js latest master (minified)
// ==========================================================================
// Project: Ember - JavaScript Application Framework
// Copyright: ©2011-2012 Tilde Inc. and contributors
// Portions ©2006-2011 Strobe Inc.
// Portions ©2008-2011 Apple Inc. All rights reserved.
// License: Licensed under MIT license
// See https://raw.github.com/emberjs/ember.js/master/LICENSE
// ==========================================================================

Keybase proof

I hereby claim:

  • I am zackangelo on github.
  • I am zackangelo (https://keybase.io/zackangelo) on keybase.
  • I have a public key whose fingerprint is AED8 4A64 B8DF 8BBC 2900 B34E FCE7 ACBB 9786 8D1C

To claim this, I am signing this object:

//One of these will make for a very bad day... Can you tell which one?
import scala.slick.session.Database
val db:Database = _ //connection pool (e.g., c3p0)
//Option A
def fetchResultsA = future {
db.withSession { implicit session =>
val query = for (c <- coffees) yield c.name