Skip to content

Instantly share code, notes, and snippets.

View jrimmer's full-sized avatar
💭
Taking it to the next level!

Jason Rimmer jrimmer

💭
Taking it to the next level!
View GitHub Profile
### 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:
@jrimmer
jrimmer / tab-bar.css
Created March 4, 2012 02:24
Make Bootstrap tabs look like a tab bar/tool bar
/* 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+ */
@jrimmer
jrimmer / sfs
Created September 19, 2011 04:45
Manage SmartFoxServer2x on Ubuntu - Start, stop, monitor w/Monit
# 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
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]
@jrimmer
jrimmer / install_rmagick_osx.sh
Created February 2, 2009 06:07
Install rmagick and dependents on OSX
#!/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
@jrimmer
jrimmer / Ubuntu Rails stack
Created February 2, 2009 05:57
Fixed bad carriage returns
#!/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.