Skip to content

Instantly share code, notes, and snippets.

View jeffandersen's full-sized avatar

Jeff Andersen jeffandersen

View GitHub Profile
@jeffandersen
jeffandersen / templates.rb
Last active January 28, 2019 14:08
Using Prefab.cloud feature flags for cohort release of a new feature
client = Prefab::Client.new(api_key: "ACCT_ID|APIKEY")
@feature_flags = client.feature_flag_client
##
# Where usr is defined as
# usr = {id: 456, attributes: ["beta"]}
if @feature_flags.feature_is_on_for? "templates", "user:" + usr[:id], attributes: usr[:attributes]}
## Execute the templates feature logic
@jeffandersen
jeffandersen / torus-cli-cla
Created October 27, 2016 00:25
Contributor license agreement for torus-cli
TBD
@jeffandersen
jeffandersen / index.js
Created November 6, 2014 18:47
Using a single hash key to store multiple values
// We want to store all three of these together
var one = 1;
var two = 2;
var three = 3;
// Redis only accepts a single value for a key
// so we must group the values together, we can use an object:
var data = {
one: one,
two: two,
@jeffandersen
jeffandersen / keybase.md
Created May 20, 2014 17:06
Keybase Verification

Keybase proof

I hereby claim:

  • I am jeffandersen on github.
  • I am jeffandersen (https://keybase.io/jeffandersen) on keybase.
  • I have a public key whose fingerprint is F2F1 AA13 ED25 D3E0 3AA6 988B 17CA 480C D15D 58F1

To claim this, I am signing this object:

@jeffandersen
jeffandersen / index.html
Last active August 29, 2015 13:57
GoInstant Audio & Video Chat
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title></title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.goinstant.net/v1/platform.min.js"></script>
<script type="text/javascript" src="https://cdn.goinstant.net/widgets/webrtc/latest/webrtc.min.js"></script>
<link rel="stylesheet" href="https://cdn.goinstant.net/widgets/webrtc/latest/webrtc.css" />
</head>
@jeffandersen
jeffandersen / .bashrc
Last active October 6, 2015 21:28
Super simple git aliases that are based around prefixing branch names with your Github username
determineBranch() {
GIT_USERNAME=$(git config --global user.user)
if [ -z "$GIT_USERNAME" ]; then
echo "No user found in git config. Set key 'user' to your github username."
BRANCH_NAME=$1
else
if [ -n "$1" ]; then
if [[ $1 == *-n* && -n "$2" ]]; then
BRANCH_NAME=$2
else