Capture:
- COUNTRY
- VAT (optional and validated)
IF country IS "GB"
ADD_VAT
IF country IS IN (eu) AND vat IS EMPTY
# https://github.com/sporkmonger/addressable/ | |
require 'addressable/template' | |
# http://dev.twitter.com/doc/get/statuses/followers | |
template = Addressable::Template.new 'http://{host=twitter.com}' + | |
'/statuses/followers{-prefix|/|id}.{format=json}' + | |
'?{-join|&|user_id,screen_name,cursor}' | |
template.expand(:id => 'mislav') | |
# => http://twitter.com/statuses/followers/mislav.json? |
module Rack | |
class ZombieShotgun | |
ZOMBIE_AGENTS = [ | |
/FrontPage/, | |
/Microsoft Office Protocol Discovery/, | |
/Microsoft Data Access Internet Publishing Provider/ | |
].freeze | |
ZOMBIE_DIRS = ['_vti_bin','MSOffice','verify-VCNstrict','notified-VCNstrict'].to_set.freeze |
net: require "net" | |
sys: require "sys" | |
LISTEN_PORT: 10000 | |
SERVER_ADDRESS: '127.0.0.1' | |
AVAILABLE_PORTS: [10001, 10002, 10003, 10004, 10005, 10006] | |
CONNECTION_COUNTER: 0 | |
reservePort: (callback) -> | |
if AVAILABLE_PORTS.length > 0 |
# Delete unnecessary files | |
run "rm public/index.html" | |
run "rm app/views/layouts/application.html.erb" | |
run "rm public/favicon.ico" | |
run "rm public/images/rails.png" | |
run "rm public/javascripts/application.js" | |
run "rm public/javascripts/prototype.js" | |
run "rm public/javascripts/effects.js" | |
run "rm public/javascripts/dragdrop.js" | |
run "rm public/javascripts/controls.js" |
# usage: rails new APP_NAME -m http://gist.github.com/627198.txt -TJ | |
# the -T drops test-unit and the -J drops prototype | |
gem "pg" | |
gem "omniauth" | |
gem "paperclip" | |
gem "haml" | |
gem "sass" |
Modernizr | |
.addTest('iframe', function() { | |
return window.top.location != window.location; | |
}) | |
.addTest('facebook', function() { | |
return !! ~ location.href.indexOf( 'fb_sig_in_iframe=1' ); | |
}); |
# install homebrew (details here: https://github.com/mxcl/homebrew/wiki/installation or just run the following command) | |
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)" | |
# install xcode: http://developer.apple.com/technologies/xcode.html | |
# install homebrew formulas (this should eventually be in official homebrew repo) | |
cd /usr/local/Library/Formula | |
curl --insecure -O "https://github.com/OpenKinect/libfreenect/raw/master/platform/osx/homebrew/libfreenect.rb" | |
curl --insecure -O "https://github.com/OpenKinect/libfreenect/raw/master/platform/osx/homebrew/libusb-freenect.rb" |
description "nginx http daemon" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
exec /opt/nginx/sbin/nginx -g "daemon off;" | |
respawn |
@import "local/provider/databar-icon/*.png"; | |
#databar { | |
.data-field { | |
.icon { | |
@include databar-icon-sprite(default); | |
@include databar-icon-sprite-dimensions(default); | |
float: left; | |
margin: 9px 3px 0 0; | |
} |