Skip to content

Instantly share code, notes, and snippets.

View evansde77's full-sized avatar

Dave Evans evansde77

View GitHub Profile
function carb_logs(){
CLUSTER=$1
knife ssh -x evansde77 role:load_balancer_${CLUSTER} "tail -f /opt/sapi/logs/carburetor_package.log" -a ip.public
}
@evansde77
evansde77 / git_shell_funcs.sh
Created February 25, 2015 16:25
Useful Bash prompt/tab settings for showing git info
#
# Added to .bash_profile on a mac, these utils will show the
# current repo in the terminal tab name and will include the current git
# branch name on the shell prompt.
#
function set_terminal_tabname {
# function that sets Terminal Tab name to $1
printf "\e]1;$1\a"
@evansde77
evansde77 / installer.sh
Last active August 29, 2015 14:05
Cirrus installer script with a public URL
#!/bin/bash
#
# installer for cirrus
# Sets up working dir eg $HOME/.cirrus
# Clones latest stable tag of cirrus into it
# runs setup commands to build venv for cirrus
# installs git alias commands
# gets token for github access & updates .gitconfig
@evansde77
evansde77 / bash_profile
Created June 18, 2014 20:36
How to show your git branch in your shell prompt
function parse_git_branch ()
{
ref=$(git symbolic-ref HEAD 2> /dev/null) || return;
BRANCH="("${ref#refs/heads/}")";
echo "${BRANCH}"
}
export PS1="[\t \W] \$(parse_git_branch) "
import unittest
import mock
from wilson.views.bluemix import BluemixSingleUser
class TestBluemixUser(unittest.TestCase):
def test_get_user(self):
@evansde77
evansde77 / gist:0a833b79b2cf104b63a0
Created May 6, 2014 14:51
How to create a wilson virtualenv with Carburetor installed in it
# carburetor build from source
git clone git@github.com:cloudant/carburetor.git
cd carburetor/
#### Check out a specific tag here if you dont want HEAD
virtualenv --distribute venv
. venv/bin/activate
pip install -r requirements.txt
# -OR- since Macs are being difficult with XCode lately...
#!/usr/bin/env python
"""
_gists_
functions for getting gists
Requires a section in your gitconfig like:
[cirrus]