Skip to content

Instantly share code, notes, and snippets.

@vishvananda
vishvananda / devstack.rb
Created October 18, 2011 23:17
Vagrant script for devstack
Vagrant::Config.run do |config|
sshdir = "#{ENV['HOME']}/.ssh/"
cachedir = (ENV['CACHEDIR'] or "#{ENV['HOME']}/cache/")
checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks")
ip_prefix = (ENV['IP_PREFIX'] or "192.168.27.")
mac_prefix = (ENV['MAC_PREFIX'] or "080027027")
suffix = "100"
ip = "#{ip_prefix}#{suffix}"
config.vm.box = "oneiric"
config.vm.box_url = "http://images.ansolabs.com/vagrant/oneiric64.box"
@gregnewman
gregnewman / gist:1653962
Created January 21, 2012 20:51
Homebrew forumula patched to allow fullscreen on Lion
cd /usr/local/Library/Formula
rm emacs.rb
wget https://raw.github.com/gist/1446720/36c7a3ab0ec8255e361dae11e0803cdf5cd09157/emacs.rb
brew install emacs --cocoa --lion
@oubiwann
oubiwann / devstack.rb
Created February 15, 2012 21:24 — forked from termie/devstack.rb
Vagrant script for devstack
Vagrant::Config.run do |config|
sshdir = "#{ENV['HOME']}/.ssh/"
checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/lab/OpenStack/openstack-cookbooks")
ip_prefix = (ENV['IP_PREFIX'] or "10.0.5.")
mac_prefix = (ENV['MAC_PREFIX'] or "080027027")
suffix = "100"
ip = "#{ip_prefix}#{suffix}"
config.vm.box = "oneiric"
config.vm.box_url = "http://images.ansolabs.com/vagrant/oneiric64.box"
config.vm.customize ['modifyvm', :id, '--memory', '350']
@jacobian
jacobian / pip-cache-install.py
Created May 1, 2012 05:22
Install a package from your local pip download cache without touching the 'net.
#!/usr/bin/env python
"""
Install a package from your local pip download cache without having to touch
the 'net at all.
You'll need to be using a pip download cache; that is, you'll need the
following in your ~/.pip/pip.cfg:
[install]
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@jpellerin
jpellerin / books.txt
Last active December 15, 2015 15:59
Things I've read recently and liked
Upcoming releases!
Scott Lynch - Republic of Thieves - 10/8
Recent
Guy Gavriel Kay - Sailing to Sarantium - 9
Cat Valente - Six Gun Snow White - 10
Lev Grossman - The Magicians - 7
@ChrisBeaumont
ChrisBeaumont / custom.css
Last active June 22, 2022 15:20
Demystifying Python Descriptors
<style>
@font-face {
font-family: "Computer Modern";
src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');
}
div.cell{
width:800px;
margin-left:16% !important;
margin-right:auto;
}
@chmouel
chmouel / git-jenkins-error.py
Last active January 1, 2016 20:09
Script that will get the failed jobs and save the console.html (to /tmp) This probably will work only on OpenStack Gerrit/Jenkins infra.
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Simple launch gerrit-jenkins-error inside a git repo would get the failed
# job for the current commit (using the changeId) or you can add an
# argument be it the change-id the review number or even something
# like https://review.openstack.org/#/c/101010/ and it would do the
# right thing™
#
# Use the -t option to specify the output to something than /tmp
@notmyname
notmyname / gist:8552219
Last active January 4, 2016 01:59
Set up OpenStack gate graph on your desktop with GeekTool.
One time only (or whenever you change the graph definition), run build_page.py from
<https://github.com/notmyname/gate_status>. This creates simple_graph_url, a graphite URL to
generate the gate status graph. Then create grab_gate_image.sh somewhere in your $PATH and add
the cronjob. Finally add an image to GeekTool to load /tmp/gate_graph.png and set it to
refresh as often as you run the cronjob. I added the image at 80% opacity.
grab_gate_image.sh
------------------
#!/bin/sh
@harlowja
harlowja / project_release.py
Created October 27, 2014 17:46
project_release.py
import os
import pwd
import subprocess
import sys
from oslo.concurrency import processutils
from Cheetah.Template import Template