- Event Constants
- BEM style -
BUZZ__MESSAGE_CREATED
instead ofCREATED_BUZZ_MESSAGE
- Past tense -
BUZZ__MESSAGE_LIKED
instead ofBUZZ__LIKE_MESSAGE
- When multi-step, use
_STARTED
,_FINISHED
, and_FAILED
suffixBUZZ__LOAD_CHANNEL_MESSAGES_STARTED
BUZZ__LOAD_CHANNEL_MESSAGES_FAILED
- BEM style -
BUZZ__LOAD_CHANNEL_MESSAGES_FINISHED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var deps = {}; | |
function register(name, value) { | |
deps[name] = value; | |
} | |
function inject(fn) { | |
var wants = fn.wants || []; | |
var resolved = wants.map(resolve); | |
return fn.apply(null, resolved); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
awk=$(which awk || echo 'missing: install awk' && exit 1) | |
# update apt | |
sudo apt-get update | |
# get ssl related packages from simulated upgrade | |
sudo apt-get upgrade -s | grep ssl | grep Inst | $awk '{print $2}' | xargs -t sudo apt-get install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eo pipefail | |
usage(){ | |
echo "Usage: cxenv stack environment [command]" | |
exit 1 | |
} | |
[ $# -lt 3 ] && usage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eo pipefail | |
usage(){ | |
echo "Usage: docker-check image [command]" | |
exit 1 | |
} | |
version(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eo pipefail | |
usage(){ | |
echo "etcdenv - Recursively prints etcd dir as environment file" | |
echo "Usage: etcdenv rootdir" | |
exit 1 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"template": { | |
"data": [ | |
{"name": "full-name", "value": "Joe", "prompt": "Full Name"}, | |
{"name": "sports", "parameter": "quiz[sports]", "prompt": "Sports", | |
"template": { | |
"data": [ | |
{"parameter": "best_rugby", "name": "rugby", "prompt": "Best rugby team?", "value": "All Blacks" } | |
] | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- PKGBUILD.old 2013-09-30 14:24:47.000000000 -0600 | |
+++ PKGBUILD 2014-05-27 12:59:49.359684637 -0600 | |
@@ -4,7 +4,7 @@ | |
_tmpdir=/var/lib/openresty | |
pkgname=openresty | |
_pkgname=ngx_openresty | |
-pkgver=1.4.2.9 | |
+pkgver=1.5.12.1 | |
pkgrel=1 | |
pkgdesc="a powerful web app server by extending nginx" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# HubCrypt | |
# ======== | |
# | |
# Decrypt a file encrypted using hubencrypt (ok, it's just openssl + rsautl + | |
# your SSH keys). It needs the private key that matches your last public key | |
# listed at github.com/<user>.keys | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module CsrfHelpers | |
def token | |
session[:csrf] ||= SecureRandom.hex(32) | |
end | |
def csrf_input_tag | |
%Q(<input type="hidden" name="authenticity_token" value="#{token}" />) | |
end | |
def csrf_meta_tag |