Skip to content

Instantly share code, notes, and snippets.

Jeff Andersen jeffandersen

Block or report user

Report or block jeffandersen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jeffandersen
jeffandersen / templates.rb
Last active Jan 28, 2019
Using Prefab.cloud feature flags for cohort release of a new feature
View templates.rb
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 Oct 27, 2016
Contributor license agreement for torus-cli
@jeffandersen
jeffandersen / index.js
Created Nov 6, 2014
Using a single hash key to store multiple values
View index.js
// 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
Keybase Verification
View keybase.md

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 Aug 29, 2015
GoInstant Audio & Video Chat
View index.html
<!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 Oct 6, 2015
Super simple git aliases that are based around prefixing branch names with your Github username
View .bashrc
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
You can’t perform that action at this time.