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
### Keybase proof | |
I hereby claim: | |
* I am jrimmer on github. | |
* I am jrimmer (https://keybase.io/jrimmer) on keybase. | |
* I have a public key whose fingerprint is F021 1B7B 162F 3B69 B7F6 0FDC 7C0C 1A53 5151 624A | |
To claim this, I am signing this object: |
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
/* Make tabs looks like a bar */ | |
.tab-bar { | |
width: 100%; | |
/* height: 36px; */ | |
background-color: #eeeeee; /* Old browsers */ | |
background-repeat: repeat-x; /* Repeat the gradient */ | |
background-image: -moz-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* FF3.6+ */ | |
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */ | |
background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Chrome 10+,Safari 5.1+ */ | |
background-image: -ms-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* IE10+ */ |
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
# Place in /etc/monit/conf.d/ | |
# Notes: Thresholds such as totalmen and cpu are application-specific | |
check process sfs with pidfile /var/run/sfs.pid | |
start program = "/etc/init.d/sfs start" | |
stop program = "/etc/init.d/sfs stop" | |
if cpu > 20% for 2 cycles then alert | |
if cpu > 25% for 5 cycles then restart | |
if totalmem > 2048.0 MB for 5 cycles then restart | |
if 5 restarts within 5 cycles then timeout |
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
class B62 | |
CHARS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split('') | |
BASE = 62 | |
def self.encode(value) | |
s = [] | |
while value >= BASE | |
value, rem = value.divmod(BASE) | |
s << CHARS[rem] | |
end | |
s << CHARS[value] |
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 | |
curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.3.5.tar.gz | |
tar xzvf freetype-2.3.5.tar.gz | |
cd freetype-2.3.5 | |
./configure --prefix=/usr/local | |
make | |
sudo make install | |
cd .. | |
curl -O http://superb-east.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.23.tar.bz2 |
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 | |
# Inspired by http://blog.fiveruns.com/2008/9/24/rails-automation-at-slicehost | |
# | |
# This is a fork of: http://gist.github.com/16225 | |
# | |
# To it I've added: | |
# - Installation of the MySQL gem which is no longer included with Rails | |
# - A switch from Passenger 2.0.3 (specified in the original script) to 2.0.6 | |
# - Explanatory text at the end of the script to help the user understand | |
# what to do next. |