Skip to content

Instantly share code, notes, and snippets.

View jmvrbanac's full-sized avatar

John Vrbanac jmvrbanac

View GitHub Profile
@jmvrbanac
jmvrbanac / run.sh
Last active August 29, 2015 13:56
CloudCAFE Jenkins Script
#!/bin/bash
set +x
# Setup all of the pyenvs
export PATH="$HOME/.pyenv/bin:$PATH"
export CONFIGURE_OPTS='--enable-shared'
eval "$(pyenv init -)"
pyenv shell 2.7.6
pyenv virtualenvwrapper
pyenv rehash
@jmvrbanac
jmvrbanac / dev_cafe.sh
Created February 10, 2014 16:27
CAFE Tmux setup
#!/bin/bash
BASEDIR="/home/john/Repositories/github/CAFE"
VENV_NAME="CloudCAFE"
PROJECT="CAFE-Dev"
set_env_and_clear(){
num_panes=`tmux list-panes -t $PROJECT:$1 | wc -l`
for (( i=0; i<${num_panes}; i++ ));
do
@jmvrbanac
jmvrbanac / DevStack_Barbican.sh
Last active August 29, 2015 13:57
Setup Development DevStack for Barbican
#!/bin/sh
# This script is designed to be used on a disposable cloud server
sudo apt-get update
sudo apt-get install git -y
mkdir -p Repositories
cd Repositories
git clone https://github.com/openstack-dev/devstack.git
git clone https://github.com/stackforge/barbican.git
@jmvrbanac
jmvrbanac / .tmux.conf
Created March 11, 2014 14:44
Tmux settings
set -g default-terminal "xterm-256color"
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
source '/usr/local/lib/python2.7/dist-packages/powerline/bindings/tmux/powerline.conf'
bind-key -n "C-Left" select-window -t :-
bind-key -n "C-Right" select-window -t :+
bind-key -n "C-q" detach
bind-key -n "C-k" kill-session
@jmvrbanac
jmvrbanac / gist:9963882
Last active August 29, 2015 13:58
Bypass launchpad pip issues
pip install launchpadlib==1.10.2 --allow-external launchpadlib --allow-unverified launchpadlib --allow-external lazr.authentication --allow-unverified lazr.authentication
pip install lazr.restfulclient>=0.9.19 --allow-external lazr.authentication
@jmvrbanac
jmvrbanac / gist:11103001
Created April 20, 2014 02:02
Adding iso library to XenServer
xe sr-create name-label=USB type=iso device-config:legacy_mode=true device-config:location=/mnt/usbdrive content-type=iso
@jmvrbanac
jmvrbanac / disable_graphical_grub.sh
Last active August 29, 2015 14:00
Disable graphical Grub for Debian guest on XenServer 6
#!/bin/sh
# Disable graphical Grub due to Xen defect which causes a blank screen
sed -i "s/#GRUB_TERMINAL=console/GRUB_TERMINAL=console/g" /etc/default/grub
# Set Grub timeout to a reasonable amount
sed -i "s/GRUB_TIMEOUT=5/GRUB_TIMEOUT=20/g" /etc/default/grub
# Update Grub
update-grub
@jmvrbanac
jmvrbanac / set_default_browser.sh
Last active August 29, 2015 14:04
Set chromium as default gnome browser under xfce
#!/bin/bash
# For Chromium
gvfs-mime --set x-scheme-handler/http chromium-browser.desktop
gvfs-mime --set x-scheme-handler/https chromium-browser.desktop
# For Chrome
gvfs-mime --set x-scheme-handler/http google-chrome.desktop
gvfs-mime --set x-scheme-handler/https google-chrome.desktop
@jmvrbanac
jmvrbanac / .gitconfig
Created July 16, 2014 15:50
Personal Git Config
[alias]
dl = diff HEAD^1
dsl = diff HEAD^1 --stat
pep8-last = !git diff HEAD^1 | flake8 --diff
ru = remote update
plog = log --pretty=\"format:%Cgreen %h %Creset| %Cblue%G?%Creset | %ar | %aN | %Cblue%s\"
delete-merged = !git branch --merged | grep -v '^* master$' | grep -v '^ master$' | xargs git branch -d
[diff]
tool = bc3
@jmvrbanac
jmvrbanac / clean_docker.sh
Created July 22, 2014 21:22
Cleanup all non-running docker images
#!/bin/bash
sudo docker rm `sudo docker ps --no-trunc -a -q`
sudo docker rmi $(sudo docker images | awk '$1!~/centos/ && NR>1 {print $3}')