Skip to content

Instantly share code, notes, and snippets.

View chipchilders's full-sized avatar

Chip Childers chipchilders

View GitHub Profile
### Keybase proof
I hereby claim:
* I am chipchilders on github.
* I am chipchilders (https://keybase.io/chipchilders) on keybase.
* I have a public key whose fingerprint is 91E8 2268 5032 2162 5EEF 69D4 C3A3 9275 CC56 CEA8
To claim this, I am signing this object:
@chipchilders
chipchilders / rover1.ino
Created January 7, 2014 20:36
First pass at an RC car control program.
int pinI1=8;
int pinI2=11;
int speedpinA=9;
int pinI3=12;
int pinI4=13;
int speedpinB=10;
int speed =255;
int turnspeed =255;
void setup()
@chipchilders
chipchilders / sketch.ino
Created January 6, 2014 16:56
Playing with LEDs
// Set the Digital PIN numbers
const int RGB_RED_LED_PIN = 9;
const int RGB_GREEN_LED_PIN = 10;
const int RGB_BLUE_LED_PIN = 11;
const int BLUE_LED_PIN = 2;
// Init RGB LED color intensity values
int redIntensity = 0;
int greenIntensity = 0;
int blueIntensity = 0;
@chipchilders
chipchilders / advanced-large.cfg
Created July 22, 2013 18:21
CloudStack Simulator of 32 host advanced zone + test to deploy 250 vms
{
"zones": [
{
"name": "Sandbox-simulator",
"guestcidraddress": "10.1.0.0/16",
"dns1": "10.147.28.6",
"physical_networks": [
{
"broadcastdomainrange": "Zone",
"vlan": "100-200",
diff --git a/client/tomcatconf/simulatorComponentContext.xml.in b/client/tomcatconf/simulatorComponentContext.xml.in
index 7225e84..9c02efa 100644
--- a/client/tomcatconf/simulatorComponentContext.xml.in
+++ b/client/tomcatconf/simulatorComponentContext.xml.in
@@ -251,4 +251,14 @@
<property name="name" value="ExplicitDedicationProcessor"/>
<property name="type" value="ExplicitDedication"/>
</bean>
+
+<bean id="eventNotificationBus" class="org.apache.cloudstack.mom.rabbitmq.RabbitMQEventBus">
#!/usr/bin/env python
import pika
# Creates a connection to the RabbitMQ broker running on localhost
connection = pika.BlockingConnection(pika.ConnectionParameters(
host='localhost'))
# Gets a channel to use for communicating with the broker
channel = connection.channel()
@chipchilders
chipchilders / gist:4429461
Created January 1, 2013 19:25
highlight regex during tail
Found this here: http://fixunix.com/unix/83044-tail-color.html
tail -f file | perl -pe 's/keyword/\e[1;31;43m$&\e[0m/g'
@chipchilders
chipchilders / license_replacement.py
Created June 11, 2012 15:46
license text replacement script
#!/usr/bin/env python
import os
import sys
def main():
target_dir = sys.argv[len(sys.argv)-1]
for root, dirs, files in os.walk(target_dir):
@chipchilders
chipchilders / tail.py
Created April 16, 2012 20:33
Tail in python
#!/usr/bin/python
import sys
import os
def main():
filename = sys.argv[len(sys.argv)-1]
targetlines = 10
countedlines = 0
default_chunk = os.statvfs(filename).f_bsize
@chipchilders
chipchilders / test1.rb
Created April 20, 2011 12:56
Really simple Sinatra app to explore a CloudFoundry runtime environment
require 'sinatra'
require 'pp'
get '/' do
processor = `head /proc/cpuinfo`
memory = `head /proc/meminfo`
swap = `head /proc/swap`
linuxversion = `head /proc/version`
disks = `head /proc/partitions`
appuser = `whoami`