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
{% set DataSource %}node-filter-tags{% end %} | |
{% begin contents %} | |
<img src="%#primary-media.#thumbnails=100x100.#url%" alt="%Title%" /> | |
{% 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
include Newflow | |
define_workflow do | |
state :draft, :start => true do | |
transitions_to :published, :if => lambda { true } | |
end | |
state :published do | |
transitions_to :unpublished , :if => lambda { true } | |
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
❼ > rake db:migrate --trace | |
(in /Users/lgraybill/code/pifa-on-rails) | |
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
Requiring REXML | |
** Execute db:migrate | |
== CreateGalleries: migrating ================================================ | |
-- create_table(:galleries) | |
NOTICE: CREATE TABLE will create implicit sequence "galleries_id_seq1" for serial column "galleries.id" |
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 lazy aliases | |
alias desktop="cd ~/Desktop && ll" | |
alias bashrc="mate ~/.bash_profile" | |
alias restart="sudo shutdown -r now" | |
alias hosts="mate /etc/hosts" | |
alias code="cd ~/code" | |
#Rails aliases | |
alias ss="script/server" | |
alias sc="script/console" |
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
> brew install redcar | |
/usr/bin/git | |
==> Cloning git://github.com/danlucraft/redcar.git | |
Updating /Users/admin/Library/Caches/Homebrew/redcar--git | |
You need the RSpec gem installed under JRuby or this will not work. | |
==> jruby bin/redcar install | |
==> jruby -S rake build | |
(in /private/tmp/homebrew-redcar-HEAD-nLMT) | |
rake aborted! | |
RubyGem version error: rspec(2.5.0 not < 2.0) |
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
> brew doctor | |
We couldn't detect gcc 4.0.x. Some formulae require this compiler. | |
You changed your cc to symlink to llvm. | |
This bypasses LLVM checks, and some formulae may mysteriously fail to work. | |
You may want to change /usr/bin/cc to point back at gcc. | |
To force Homebrew to use LLVM, you can set the "HOMEBREW_USE_LLVM" environmental | |
variable, or pass "--use-llvm" to "brew install". |
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
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
pu = push | |
pl = pull | |
pub = "!f() { git push ${1:-origin} `git symbolic-ref HEAD`; }; f" | |
[user] | |
email = [email protected] | |
name = Linus Graybill |
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 'csv' | |
def coordinates(addr) | |
include Geokit::Geocoders | |
res=MultiGeocoder.geocode(addr) | |
res.ll | |
end | |
namespace :import do | |
desc 'Parse CSV files and import into the database' |
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
def self.coordinates(addr) | |
include Geokit::Geocoders | |
res=MultiGeocoder.geocode(addr) | |
r = res.ll.split(',') | |
[r[0].to_f, r[1].to_f] | |
end | |
def self.create(params = nil) | |
loc = coordinates(params[:address1] + "+PA+" + params[:zipcode]) | |
super |
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
class Location | |
include MongoMapper::Document | |
scope :restaurants, where(:loc_type => 'restaurant') | |
scope :bars, where(:loc_type => 'bar') | |
scope :trucks, where(:loc_type => 'truck') | |
key :name, String, :required => true | |
key :store_no, Integer | |
key :address1, String |