Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang='en'>
<head>
<title>LiftCalc</title>
<meta http-equiv='Content-type' content='text/html;charset=UTF-8'>
<meta name='viewport' content='width=device-width'>
<meta name='viewport' content='initial-scale=1.6'>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<script type='text/javascript'>
class LegislatorsController < ApplicationController
layout :choose_layout
def search
setup_search(legislators_path(:u => params[:u]))
end
def bm_search
setup_search(bm_legislators_path(:u => params[:u]))
end
#!/bin/bash
# Unattended REE/Passenger installation
# Source: http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/
# 15/03/09 Updated to use latest r.e.e. and passenger 2.1 and rewrote bits thanks to the comments left on my blog. Thanks guys
if [ "$(whoami)" != "root" ]; then
echo "You need to be root to run this!"
exit 2
fi
@mileszs
mileszs / snippet.rb
Created February 26, 2009 20:07 — forked from jqr/snippet.rb
require 'rational'
class Numeric
def to_r(rounding = 10_000)
Rational((self * rounding).to_i, rounding)
end
end
class Rational
def to_proper
#!/bin/bash
VERSION="1.1"
REEV="http://rubyforge.org/frs/download.php/48623/ruby-enterprise-1.8.6-20081215.tar.gz"
REEF="ruby-enterprise-1.8.6-20081215.tar.gz"
REEFF=${REEF%".tar.gz"}
PASSENGER="2.0.6"
echo "#####################################"
echo "Welcome, let's get this party rollin'"
echo "#####################################"