This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: tabstop=4 shiftwidth=4 softtabstop=4 | |
# Copyright 2011 OpenStack, LLC. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: tabstop=4 shiftwidth=4 softtabstop=4 | |
# Copyright 2011 OpenStack, LLC. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file autogenerated by Chef | |
# Do not edit; changes will be overridden. | |
# Instead, edit node["keystone"]["configuration"] | |
<%= | |
content = '' | |
# Normally sort isn't safe on hashes, as symbols do not sort. | |
# In this case, we know that the content has been converted two and from json | |
# and will have only string keys. | |
@config.sort.each do |name, subconfig| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global] | |
size=1G | |
numjobs=4 | |
[SSD workload 65/35 - 1KB] | |
description=1K 65/35 rw | |
new_group | |
rw=randrw | |
bs=1k | |
ioengine=libaio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; These are my minor ido tweaks | |
(ido-mode t) | |
(define-key (cdr ido-minor-mode-map-entry) [remap write-file] nil) | |
(unless (fboundp 'sixth) | |
(defun sixth (l) "returns the sixth element of a list" | |
(nth 5 l))) | |
;configure ido | |
(setq ido-enable-prefix nil | |
ido-enable-flex-matching t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
states = ["START", "RESOURCE", "ACTION", "PROPERTY", "SUBRESOURCE", "SUBRESOURCE_END", "END"] | |
transitions = { | |
"START": ["RESOURCE"], | |
"RESOURCE": ["ACTION"], | |
"ACTION": ["SUBRESOURCE", "PROPERTY"], | |
"PROPERTY": ["SUBRESOURCE", "PROPERTY", "SUBRESOURCE_END", "END"], | |
"SUBRESOURCE": ["PROPERTY", "SUBRESOURCE"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commands = """ | |
def p = "sudo ip a".execute() | |
p.waitFor() | |
print p.in.text | |
print p.err.text | |
""" | |
//def commands = "print \"Hello world!\"" | |
println "AUGH: ${hudson.model.Hudson.instance.slaves}" | |
for (slave in hudson.model.Hudson.instance.slaves) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
class ThreadFunction(threading.Thread): | |
def __init__(self, group=None, target=None, name=None, | |
args=(), kwargs={}, Verbose=None): | |
self._return = None | |
super(ThreadFunction, self).__init__(group, self._wrap(target), | |
name, args, kwargs, Verbose) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def zebra_execute(json, endpoint, token): | |
return requests.post( | |
endpoint, | |
headers={ | |
"X-Auth-Token": token, | |
"Content-Type": "application/json", | |
"X-ZeroVM-Execute": "1.0"}, | |
data=json).content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlite3 | |
con = sqlite3.connect("/dev/input") | |
cursor = con.cursor() | |
cursor.execute("Select name from object") | |
print "\n".join([item[0] for item in cursor.fetchall()]) |
OlderNewer