Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
virt_connect="--connect=qemu:///session"
virsh="virsh ${virt_connect}"
svirsh="sudo virsh"
count=3
onlyone=$1
name=beekhof
SCRIPT_vm_vcpu=2
@dstanek
dstanek / make-ics.py
Last active October 20, 2016 21:15
Create a personalized iCal for the OpenStack Newton Summit schedule
#!/usr/bin/env python3
# Download https://www.openstack.org/summit/austin-2016/summit-schedule/mine/?goback=1
# to mine.html and then run this script. The my.ics can be imported into your
# calendar.
#
# Common problems:
# - i've only tested against my calendar (and got feedback about bugs from others) so
# so you may find the parsing isn't quite right
@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
@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
@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
@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;
}
@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
@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:

@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]
@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']