- Mac OS X 10.7.2
- Homebrew 0.8.1
- Apple Command Line Tools
- ZSH
- Git 1.7.5.4
- RVM 1.10.1
- Ruby 1.9.3
- Passenger 3.0.11
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
$(document).ready(function() { | |
$('.swap').swapper(); | |
// or | |
$('.video_swap').swapper({ | |
destination: 'video', | |
link_attr: 'href', | |
video_width: 526, | |
video_height: 296 | |
}); |
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
# "https://maps.googleapis.com/maps/api/place/search/json?key=AIzaSyDKpxPRiMFWSaF99KRLnGf6EiJPTGzuIvk&location=-33.966136,151.102687&name=harbour&radius=500&sensor=false&types=food" | |
search = Google::PlacesSearch.new({ | |
:lat => "-33.966136", | |
:lng => "151.102687", | |
:radius => "500", | |
:types => "food", | |
:name => "harbour", | |
:sensor => "false", | |
:key => "AIzaSyDKpxPRiMFWSaF99KRLnGf6EiJPTGzuIvk", | |
:user_ip => "184.60.81.8" |
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
# 2012-01-07 | |
# | |
# Mac OS X 10.6.8 | |
# Homebrew 0.7 | |
# Xcode 3.2.4 | |
# Git 1.7.3.1 | |
# RVM 1.0.12 | |
# Ruby 1.9.2, 1.8.7 | |
# Rails 3.0.0 | |
# Passenger 3.0.0.pre4 |
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
# Build instance variables for block regions and loads an | |
# array of blocks into them | |
def load_blocks | |
@regions = Block.regions | |
@blocks = regions.blocks | |
@block_regions = regions.regions | |
@block_regions.each do |block, value| | |
instance_variable_set "@#{block}", @blocks.select{ |b| b if b.where_to_show == value } | |
end |
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
= render "maps/map", :map => @map |
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
module Admin | |
class RenderingController < ActionController::Base | |
include Locomotive::Routing::SiteDispatcher | |
include Locomotive::Render | |
before_filter :require_site | |
before_filter :authenticate_admin!, :only => [:edit] | |
before_filter :validate_site_membership, :only => [:edit] |
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
" Use Pathogen: | |
call pathogen#runtime_append_all_bundles() | |
call pathogen#helptags() | |
" ================ | |
" Ruby stuff | |
" ================ | |
syntax on " Enable syntax highlighting | |
filetype plugin indent on " Enable filetype-specific indenting and plugins |
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
# get the yaml as a hash and pass it in to the new method | |
@sites = Portfolio::Site.new(data.sites) | |
# returns an array of Portfolio::Site objects | |
@sites.all |
OlderNewer