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
VERSION="0.9.9" | |
BUILD="betable1" | |
set -e -x | |
# Keep track of the original working directory. | |
OLDESTPWD="$PWD" | |
# Work in a temporary directory. | |
cd "$(mktemp -d)" |
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
# HTTP Status Cats | |
# Apache (htaccess) config created by @dave1010 | |
# Licensed CC BY 2.0 | |
# Images CC BY 2.0, from GirlieMac's photostream: | |
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/ | |
# Usage: copy save this file as .htaccess or add it to your httpd.conf | |
ErrorDocument 404 '<a href="http://www.flickr.com/photos/girliemac/6508022985/" title="404 - Not Found by GirlieMac, on Flickr"><img src="http://farm8.staticflickr.com/7172/6508022985_b22200ced0.jpg" width="500" height="400" alt="404 - Not Found"></a>' |
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
#!/bin/sh | |
# | |
# Tells the Debian version reading the OpenSSH banner | |
# Requires OpenSSH to be running and ssh port to be open. | |
# | |
# Usage: $0 <hostname> | |
# | |
# Cosimo, 23/11/2011 | |
HOST=$1 |
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/env perl | |
# | |
# Fires HTTP request batches at the specified hostname | |
# and analyzes the response times. | |
# | |
# If you have suspicious frequency of 3.00x, 9.00x, 21.00x | |
# seconds, then most probably you have a problem of packet loss | |
# in your network. | |
# | |
# cosimo@opera.com, sometime in 2011 |
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
Cpu(s): 10.0%us, 7.0%sy, 0.0%ni, 80.6%id, 0.0%wa, 0.0%hi, 2.4%si, 0.0%st | |
Mem: 1058730500k total, 22323100k used, 1036407400k free, 103608k buffers | |
Swap: 11558908k total, 0k used, 11558908k free, 2564672k cached | |
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | |
132101 nobody 20 0 2239m 904m 748m S 2117 0.1 53:26.55 varnishd | |
132977 test 20 0 23952 1728 1260 R 100 0.0 0:56.71 httperf | |
132978 test 20 0 23952 1728 1260 R 100 0.0 0:54.73 httperf | |
132980 test 20 0 23952 1732 1260 R 100 0.0 0:43.50 httperf | |
132981 test 20 0 23952 1728 1260 R 100 0.0 0:34.78 httperf |
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
#!/bin/sh | |
# purge-cache: Script to purge varnish cache. Defaults are defined in | |
# /etc/default/varnish. | |
# | |
# Cosimo <cosimo@cpan.org> | |
# Based on reload-vcl, by Stig Sandbeck Mathisen <ssm at debian dot org> | |
# Settings | |
defaults=/etc/default/varnish |
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
#!/bin/bash | |
# | |
# Convert remote tags imported from SVN to real git tags | |
# | |
REMOTE_TAGS=$(git branch -r | grep 'tags/' | cut -f2 -d/) | |
GIT=$(which git) | |
for t in $REMOTE_TAGS | |
do |
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/env perl | |
# The way you usually do it with Moose | |
package Moosy { | |
use Moose; | |
has number => ( | |
is => 'ro', | |
isa => 'Int', | |
); |
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/env perl | |
# | |
# Convert Opera contacts file (.adr) into | |
# mutt aliases file format. | |
# | |
# Usage: | |
# perl opera-adr-to-mutt-aliases.pl < ~/.opera/contacts.adr >> ~/.mutt/aliases | |
# | |
# Cosimo, 31/Jan/2011 | |
# |
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
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: memcached | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: memcached - Memory caching daemon |