Skip to content

Instantly share code, notes, and snippets.

@egustafson
egustafson / gist:5066857
Created March 1, 2013 18:52
Generating load on a nova / bock instance.

Notes on generating load for compute & block storage instances

Install

  • {{apt-get install sysbench}}

CPU Load

  • {{sysbench —test=cpu —cpu-max-prime=20000 run

Disk Load

  • {{cd directory-on-volume-to-exercise}}
@egustafson
egustafson / index.html
Last active December 15, 2015 18:29
Here be Dragons banner page
<html>
<head>
<style type="text/css">
body {
background-color: #444;
font-family:sans-serif;
margin-top: 100px;
}
h1 {
text-align:center;
@egustafson
egustafson / inst-common.sh
Last active December 15, 2015 18:29
Common apps to bootstrap Ubuntu boxen with.
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get autoremove -y
sudo apt-get install -y git tcsh emacs24-nox emacsen-common emacs-goodies-el
sudo apt-get install -y xterm
# reboot
@egustafson
egustafson / inst-cgp.sh
Created April 3, 2013 19:29
Bootstrap collectd+CGP in a Debian environment.
sudo apt-get install collectd lighttpd php5-cgi php5
sudo lighttpd-enable-mod fastcgi
sudo lighttpd-enable-mod fastcgi-php
service lighttpd force-reload
cd /var/www
sudo git clone git://github.com/egustafson/CGP.git cgp
## -- Local environment variables for Tomcat --
##
CATALINA_OPTS=" \
-Dcom.sun.management.jmxremote=true \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false \
-Djava.rmi.server.hostname=15.185.101.251 \
"
# -Djava.rmi.server.hostname=15.185.99.255 \
# Proxy to 'internal' service
#
global {
proxy.server = ( "" => (( "host" => "127.0.0.1", "port" => 8080 )) )
}
@egustafson
egustafson / gist:6024867
Last active December 19, 2015 22:08
HP Blue (new blue -- circa 2013)
<html>
<head>
</head>
<body>
<h1 style="color: #00A0D2;">Hewlett Packard Blue</h1>
Circa 2013 and on
</body>
</html>
@egustafson
egustafson / gist:6372851
Created August 29, 2013 00:00
cloud new user
sudo adduser <username>
sudo adduser <username> [admin|sudo]
sudo mkdir ~<username>/.ssh
sudo cp ~/.ssh/authorized_keys ~<username>/.ssh/
sudo chown -R <username> ~<username>/.ssh
# (exit; ssh <username>@host)
# full packet capture
tcpdump -i <interface> -s 65535 -w <out-file>
@egustafson
egustafson / gist:9762888
Created March 25, 2014 14:23
updating command
#!/bin/bash
while `/bin/true`; do (clear; updating-command | grepping-command); date; sleep 60; done
## ##########
while `/bin/true`; do
(clear; updating-command | grepping-command)
date
sleep 60
done