This file contains hidden or 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
| /* Leap second stress test | |
| * by: John Stultz (john.stultz@linaro.org) | |
| * (C) Copyright IBM 2012 | |
| * (C) Copyright 2013, 2015 Linaro Limited | |
| * Licensed under the GPLv2 | |
| * | |
| * This test signals the kernel to insert a leap second | |
| * every day at midnight GMT. This allows for stessing the | |
| * kernel's leap-second behavior, as well as how well applications | |
| * handle the leap-second discontinuity. |
This file contains hidden or 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
| #!/bin/bash | |
| CAT="/bin/cat" | |
| HOSTNAME=$(/bin/hostname) | |
| RABBITMQ_HOME="/var/lib/rabbitmq" | |
| RABBITMQ_COOKIE_PATH="$RABBITMQ_HOME/.erlang.cookie" | |
| RABBITMQ_COOKIE=$($CAT $RABBITMQ_COOKIE_PATH) || exit 1 | |
| ERLANG_ROOT="/usr/lib/erlang" | |
| ERL_CALL="$ERLANG_ROOT/lib/erl_interface-3.7.15/bin/erl_call" | |
| PROCS=$($ERL_CALL -c $RABBITMQ_COOKIE -sname rabbit@$HOSTNAME -a 'erlang system_info [process_count]') | |
| echo "procs.$HOSTNAME $PROCS" |
This file contains hidden or 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/share/pyshared/quantum/service.py.orig 2013-11-25 17:49:53.121840504 -0500 | |
| +++ /usr/share/pyshared/quantum/service.py 2013-11-25 18:08:03.298024098 -0500 | |
| @@ -37,6 +37,9 @@ | |
| cfg.IntOpt('periodic_interval', | |
| default=40, | |
| help=_('Seconds between running periodic tasks')), | |
| + cfg.IntOpt('api_workers', | |
| + default=0, | |
| + help=_('Number of separate worker processes for service')), | |
| cfg.IntOpt('periodic_fuzzy_delay', |
This file contains hidden or 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
| (use '[clojure.string :only [split, join]]) | |
| (use '[clojure.set :only [difference]]) | |
| (def winners | |
| (let [w "washington adams jefferson jefferson madison madison monroe | |
| monroe adams jackson jackson vanburen harrison polk taylor pierce buchanan | |
| lincoln lincoln grant grant hayes garfield cleveland harrison cleveland mckinley | |
| mckinley roosevelt taft wilson wilson harding coolidge hoover roosevelt | |
| roosevelt roosevelt roosevelt truman eisenhower eisenhower kennedy johnson nixon | |
| nixon carter reagan reagan bush clinton clinton bush bush obama obama"] |
This file contains hidden or 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/env ruby | |
| class ArrayWithHashes | |
| def initialize(hashes) | |
| @hashes = hashes | |
| end | |
| def find_by(selector) | |
| @hashes.select do |h| |
This file contains hidden or 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/env ruby | |
| class ArrayWithHashes | |
| def initialize(hashes) | |
| @hashes = hashes | |
| end | |
| def find_by(selector) | |
| hashes = [] |
This file contains hidden or 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
| #!/bin/bash | |
| # REFRIED BEANS | |
| # 'soft' rekick a rcps environment | |
| echo "PURGING THE BEANS" | |
| apt-get -y purge `dpkg -l | awk '/mysql/ {print $2}'` | |
| apt-get -y purge `dpkg -l | awk '/keystone/ {print $2}'` |
This file contains hidden or 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
| Images Talk | |
| - Who are we? | |
| Rackspace Private Cloud. We install and operate Openstack clusters, both locally in our datacenters, and remotely in customer datacenters. | |
| <pending>Reference Alamo v3?</pending> | |
| - What are we talking about? |
This file contains hidden or 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
| package main | |
| import "net/http" | |
| import "fmt" | |
| func hello(w http.ResponseWriter, r *http.Request) { | |
| contentType := w.Header().Get("Content-Type") | |
| if contentType == "application/json" { | |
| fmt.Fprintln(w, `{"Hello": "JSON"}`) | |
| } else { |
This file contains hidden or 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
| from sh import ls | |
| from fabric.api import run, env | |
| env.hosts = ['localhost', 'rightfootin.info'] | |
| def test(): | |
| print(ls('/')) # runs on every item in env.hosts |