This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/capistrano" | |
set :stages , %w(qa production) | |
set :default_stage , "qa" | |
require "capistrano/ext/multistage" | |
set :application , "APP_NAME" | |
set :repository , "[email protected]:ORG_NAME/APP_NAME.git" | |
set :user , "deploy" | |
set :runner , user | |
set :scm , :git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# My hack of the pubsub with event machine gem | |
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby | |
# - a browser with WebSocket support | |
# | |
# Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% sudo knife configure -i | |
Password: | |
Overwrite /Users/sam/.chef/knife.rb? (Y/N) y | |
Your chef server URL? http://chef.beerbin.intranet | |
Your client user name? acceptance.beerbin.intranet | |
Your validation client user name? | |
Path to a chef repository (or leave blank)? /Users/sam/Documents/Development/ruby/gems/chef/chef-repo | |
WARN: Creating initial API user... | |
ERROR: Failed to read the private key /etc/chef/webui.pem: #<Errno::ENOENT: No such file or directory - /etc/chef/webui.pem>, /usr/local/Cellar/ruby-enterprise-edition/2010.01/lib/ruby/gems/1.8/gems/chef-0.8.0/lib/chef/rest.rb:60:in `read'/usr/local/Cellar/ruby-enterprise-edition/2010.01/lib/ruby/gems/1.8/gems/chef-0.8.0/lib/chef/rest.rb:60:in `load_signing_key'/usr/local/Cellar/ruby-enterprise-edition/2010.01/lib/ruby/gems/1.8/gems/chef-0.8.0/lib/chef/rest.rb:49:in `initialize'/usr/local/Cellar/ruby-enterprise-edition/2010.01/lib/ruby/gems/1.8/gems/chef-0.8.0/lib/chef/api_client.rb:231:in `new'/usr/local/Cellar/ruby-enterprise-edition/2010.01/lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery("#pendingbeer_beerstyle #beer_beerstyle").autocomplete('/beers/ac_beerstyle.json?callback=?',{ | |
dataType: "jsonp", | |
width: 300, | |
minChars: 1, | |
max: 40, | |
parse: function(data) { | |
return jQuery.map(data, function(doc) { | |
return { | |
data: doc, | |
value: doc, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :gemcutter | |
gem 'rails', '~> 2.3.5', :require => nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[git:master] % gem bundle --backtrace | |
ERROR: While executing gem ... (NoMethodError) | |
undefined method `path' for #<Bundler::Dsl:0x1018d0908> | |
/Users/sam/Documents/Development/ruby/rails/Gemfile:1:in `evaluate' | |
/Users/sam/ree/lib/ruby/gems/1.8/gems/bundler-0.8.1/lib/bundler/bundle.rb:33:in `initialize' | |
/Users/sam/ree/lib/ruby/gems/1.8/gems/bundler-0.8.1/lib/bundler/bundle.rb:14:in `new' | |
/Users/sam/ree/lib/ruby/gems/1.8/gems/bundler-0.8.1/lib/bundler/bundle.rb:14:in `load' | |
/Users/sam/ree/lib/ruby/gems/1.8/gems/bundler-0.8.1/lib/bundler/cli.rb:36:in `initialize' | |
/Users/sam/ree/lib/ruby/gems/1.8/gems/bundler-0.8.1/lib/bundler/cli.rb:6:in `new' | |
/Users/sam/ree/lib/ruby/gems/1.8/gems/bundler-0.8.1/lib/bundler/cli.rb:6:in `run' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db/*.sqlite3 | |
log/*.log | |
tmp/**/* | |
bin/* | |
vendor/gems/ruby/1.8/* | |
!vendor/gems/ruby/1.8/cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "#{File.dirname(__FILE__)}/../vendor/bundler_gems/environment" | |
class Rails::Boot | |
def run | |
load_initializer | |
extend_environment | |
Rails::Initializer.run(:set_load_path) | |
end | |
def extend_environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given a preexisting lat/lng | |
lat | 41.9219 | |
lng | -87.6562 | |
and a table that I added a geometry column via the following sql | |
SELECT AddGeometryColumn('bars','the_geom','9102671','MULTILINESTRING',2); | |
(the srid is illinois, east, 9102671) | |
(i think lat-lngs will be stored as multistring) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
End Result: What are the Lat/Lng points for zipcode 60614's boundaries in chicago | |
I downloaded the shapefile from here | |
http://egov.cityofchicago.org:80/webportal/COCWebPortal/COC_ATTACH/zipcodes.zip | |
This page gave me directions on where to find the SRID | |
http://egov.cityofchicago.org:80/webportal/COCWebPortal/COC_ATTACH/Chicago_GIS_Addressing_Stds_May_19.pdf | |
1 Technical Mapping Specifications |