I hereby claim:
- I am ches on github.
- I am ches (https://keybase.io/ches) on keybase.
- I have a public key ASCIZr7iDy6SDxfmm4ZmlI-IfCYak4OLkqMWqBI3lp8f7Qo
To claim this, I am signing this object:
#!/bin/bash | |
# Contains a few particularities of $DAYJOB's infra environment, but you get the, erm, gist. | |
set -o errexit | |
declare -r app_jar=/opt/myapp/my-app.jar | |
declare -r consul_template_config=/etc/consul.d/template/config.json | |
declare -r flags_file="${JVM_FLAGS_FILE:=/etc/myapp/application.ini}" | |
# For JMX's weird connection negotiation in a container world |
import sbt._, Keys._ | |
import wartremover.WartRemover, WartRemover.autoImport.wartremoverClasspaths | |
trait CustomWartsKeys { | |
lazy val customWartsVersion = settingKey[String]("Version of the my-warts library dependency") | |
} | |
/** sbt plugin to integrate a package of custom WartRemover extension lints into a project's build. | |
* | |
* The purpose of an sbt plugin for this is to solve a problem with WartRemover's [[$custom-warts |
RED="\[\033[01;31m\]" | |
GREEN="\[\033[01;32m\]" | |
COLOR_NONE="\[\033[0m\]" | |
function ruby_version { | |
if [[ -f ~/.rvm/bin/rvm-prompt ]]; then | |
local system=$(~/.rvm/bin/rvm-prompt s) | |
local interp=$(~/.rvm/bin/rvm-prompt i) | |
if [[ ! -n $system ]]; then | |
# Don't show interpreter if it's just MRI |
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "bloop: compile all", | |
"type": "shell", | |
"command": "bloop compile $(bloop projects)", | |
"group": { "kind": "build", "isDefault": true }, |
# This LOOKS pretty straightforward, but it took awhile to sort out issues with | |
# py2cairo and pygobject, so I hope I've saved you some time :-) | |
# | |
# This assumes you already subscribe to a nice clean virtualenvwrapper workflow | |
# -- see https://gist.github.com/771394 if you need advice on getting there. | |
# There are some optional dependencies omitted, so if you're going to be doing | |
# heavy development with these libs, you may want to look into them. | |
# | |
# We go to some configure option pains to avoid polluting the system-level | |
# Python, and `brew link`ing Cairo which is keg-only by default. |
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. | |
* |
Warden::Manager.serialize_into_session{|user| user.id } | |
Warden::Manager.serialize_from_session{|id| User.get(id) } | |
Warden::Manager.before_failure do |env,opts| | |
# Sinatra is very sensitive to the request method | |
# since authentication could fail on any type of method, we need | |
# to set it for the failure app so it is routed to the correct block | |
env['REQUEST_METHOD'] = "POST" | |
end | |
import scala.language.implicitConversions | |
/** A process exit status. */ | |
sealed abstract class ExitStatus(val code: Int) extends Product with Serializable | |
/** Exit statuses used conventionally across components. */ | |
object ExitStatus { | |
case object Success extends ExitStatus(0) | |
case object Error extends ExitStatus(1) | |
case object BadUsage extends ExitStatus(2) // 2 is conventional, e.g. bash builtins, grep |
I hereby claim:
To claim this, I am signing this object:
require 'spec_helper' | |
# Bustle is a pubsub system used for activity streams: | |
# https://github.com/fredwu/bustle | |
# | |
# 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 } |