Skip to content

Instantly share code, notes, and snippets.

Joe Fiorini joefiorini

Block or report user

Report or block joefiorini

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:101
def what_is_gist
"I don't know wtf it is."
end
View gist:106
%h1.title RetireHQ Privacy Policy
#terms.generic
%p Last updated: July 21, 2008
%h2 Data Collected by the RetireHQ Website
%p Your privacy is of paramount importance to us. We believe that by respecting your privacy we will earn the opportunity to build a lasting relationship with your business, your clients and your staff. Any information you provide to us will only be used for the purpose for which it was submitted. We collect your information primarily for contact and billing purposes. Under no circumstances will your information be shared with, or sold to, or disclosed to any third party, except where required by law.
View gist:5808
def what_is_gist
Sex::Pure
end
View gist:6721
mvim `grep -r for_users_by_type * --include "*.rb" | cut -d ":" -f1 `
View gist:6998
I won't bore you with a long introduction when I can do it just as easily with a short one.
Now for the part you've all been waiting for, the end.
@joefiorini
joefiorini / Banking.cob
Created Sep 3, 2008
Came across a COBOL app I wrote in college. Thought it'd be fun to post.
View Banking.cob
IDENTIFICATION DIVISION.
PROGRAM-ID. EXAMPLE2.
************************************************************************
* Put your name and a description of the program here *
* *
************************************************************************
ENVIRONMENT DIVISION.
@joefiorini
joefiorini / spin.rb
Created Sep 8, 2008
A simple script to restart passenger sites; quicker than typing touch tmp/restart.txt
View spin.rb
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/../config/boot'
`touch #{RAILS_ROOT}/tmp/restart.txt`
@joefiorini
joefiorini / gist:13144
Created Sep 26, 2008
Code to make resource controllers more RESTful
View gist:13144
class ApplicationResourceController < ApplicationController
resource_controller
protect_from_forgery :only => [:update, :delete]
index.wants.xml { render :xml => collection.to_xml, :status => :ok }
show do
failure.wants.xml { render :nothing => true, :status => 404 }
wants.xml do
unless object
View gist:13148
class ShowsController < ApplicationResourceController
def route_name
'show'
end
def resource_name
'show'
end
You can’t perform that action at this time.