Public Gists by jngo

Gravatar
Thu Nov 05 03:21:01 -0800 2009
1
2
3
# Enable gzip compression.
SetOutputFilter DEFLATE
 
gist: 130420 Returning HTML in AJAX call...
Gravatar
Mon Jun 15 16:16:06 -0700 2009
1
2
3
# Three things to add:
# * before_filter call
# * action_has_layout? method (if you have one, combine them)
gist: 130138 Gist API example.
Gravatar
Mon Jun 15 07:34:53 -0700 2009
1
2
3
require 'net/http'
require 'uri'
 
gist: 119088 Implementing single name at...
Gravatar
Wed May 27 21:24:25 -0700 2009
1
2
3
class CreditCard < ActiveMerchant::Billing::CreditCard
  def name_on_card
    "#{first_name} #{last_name}".strip
Gravatar
Mon Apr 27 07:50:52 -0700 2009
1
2
3
# Why build a site? Why do your customers care?
 
The core purpose of a website is to help your customers answer the questions necessary to do business with you.
gist: 48324 Grabbing mysql production d...
Gravatar
Sat Jan 17 04:17:03 -0800 2009
1
2
3
# Via Ben Scharz (http://www.germanforblack.com/2007/grabbing-mysql-production-databases-to-your-local-system-with-rake)
namespace :db do
desc "Sync your local database with a remote one REMOTE=name_of_database LOCAL=your_local_db"
Gravatar
Mon Jan 12 21:12:51 -0800 2009
1
2
3
$("ul#featured").mouseover(function()
{
  $("div.popup").slideUp();
gist: 44418 Subdomains in Ruby on Rails
Gravatar
Wed Jan 07 12:46:10 -0800 2009
1
2
3
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer: