Skip to content

Instantly share code, notes, and snippets.

// Copyright 2005-2010 Canonical Limited. All rights reserved.
var LANDSCAPE_YUI_CONFIG = {
filter: "min",
base: "/static/yui/"
};
// If Javascript debugging is enabled, configure the YUI loader to use
// the debug versions of the Javascript files.
@sidnei
sidnei / example.css
Created September 28, 2010 04:50
prefetch examples
/* Overlay Look/Feel */
.yui3-overlay-content {
padding:2px;
border:1px solid #000;
background-color:#aaa;
font-size:93%;
}
.yui3-overlay-content .yui3-widget-hd {
font-weight:bold;
// Works. Logs 'click'.
YUI().use("event", "node", "node-event-simulate", function(Y){
var node = Y.one(".item");
node.on("foo|click", function() {
console.log("clicked");
});
node.simulate("click");
node.detach("foo|click");
node.simulate("click");
});
@sidnei
sidnei / gist:1327886
Created October 31, 2011 16:25
irc plugin auth failure with openid
import os
import sys
import select
import time
import fcntl
#from multiprocessing import Pipe
from billiard import Pipe
parent, child = Pipe()
@sidnei
sidnei / status.yaml
Created May 29, 2013 01:50
A subset of Ubuntu One (less than 30% of the full service) deployed with Juju into our development Openstack environment
machines:
0:
agent-state: running
dns-name: 10.55.63.161
instance-id: 16104caa-c963-45a0-9be7-03c7be6cd631
instance-state: running
1:
agent-state: running
dns-name: 10.55.63.54
instance-id: e06c6bdd-80ab-47d3-973c-18bf5c27a0a0
@sidnei
sidnei / gist:7041338
Last active May 8, 2021 12:36
Using lvm thin provisioning
# Using lvm thin provisioning, per https://github.com/lxc/lxc/pull/67
# First we create a volume group to hold the thin pool
$ sudo vgcreate lxc /dev/sde3
# Then create a thin-pool named 'tp' within that volume group
$ sudo lvcreate -l 90%VG --type thin-pool --thinpool tp lxc
$ sudo fallocate -l 6G /tmp/lxc
$ sudo losetup -f /tmp/lxc
$ sudo pvcreate /dev/loop0
$ sudo vgcreate lxc /dev/loop0
$ sudo lvcreate -l 95%FREE --type thin-pool --thinpool lxc lxc
$ sudo lvs
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
lxc lxc twi-a-tz- 5.70g 0.00