Skip to content

Instantly share code, notes, and snippets.

View davidlee's full-sized avatar

David Lee davidlee

View GitHub Profile
Add "+universal" to /opt/local/etc/macports/variants.conf
Uncomment in /opt/local/etc/macports.conf:
variants_conf /opt/local/etc/macports/variants.conf
sudo port -v install git-core +bash_completion +doc
sudo port -v install ImageMagick \
Xft2 \
antiword \
atk \
def donation_uk_giftaid
unless request.post?
redirect_to :action=>"donate"
return
end
@heroPage = HeroPage.search_url(params[:url], DateTime.now)
hero_page_variables("preview", true)
if session[:mydonation_id]
@donation = Donation.find_by_id(session[:mydonation_id])
@donation.update_attributes(params[:donation])
module PageHelper
def hero?
!!params[:event_url]
end
def event?
!hero? && !!params[:url]
end
@davidlee
davidlee / gist:81790
Created March 19, 2009 12:32
eventmachine policy file server for flash
equire 'rubygems'
require 'eventmachine'
module Socky
module Policy
DEBUG = true
HOST = 'localhost'
PORT = 843
EOF = "\r\000"
REQUEST = "<policy-file-request/>\000"
#!/usr/bin/ruby
require 'rubygems'
require 'thor'
require 'chef'
require 'chef/node'
require 'chef/rest'
Chef::Config.from_file("/etc/chef/server.rb")