Skip to content

Instantly share code, notes, and snippets.

View jmvrbanac's full-sized avatar

John Vrbanac jmvrbanac

View GitHub Profile
@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}')
@jmvrbanac
jmvrbanac / copy_key_to_servers.sh
Created July 29, 2014 15:20
Copy ssh pub key to a list of servers
#!/bin/bash
pub_key=~/.ssh/id_rsa.pub
while read server
do
echo "Copying to $server"
ssh-copy-id -i $pub_key root@$server
done <servers.txt
@jmvrbanac
jmvrbanac / requests.md
Last active August 29, 2015 14:07
Barbican Request (cheatsheet for workshop)

Get Authentication Token:

POST http://workshop-ord-auth.cloudkeep.io/v2.0/tokens
Content-Type: application/json
Accept: application/json

Body: