Skip to content

Instantly share code, notes, and snippets.

View joshskeen's full-sized avatar
💻
☕️

Josh Skeen joshskeen

💻
☕️
View GitHub Profile
@joshskeen
joshskeen / foo
Created May 6, 2011 20:04
brainTeaser
public class Frodo extends Hobbit{
public void main(String[] args){
countGold(6, 7);
}
}
class Hobbit{
int countGold(int x, int y){
return x+y;
}
-unless @items.empty?
div class="row"
div class="span6"
h2 todo list:
div
table width=500 class="table-striped table-condensed table-bordered"
tr
th name
th description
div class="row"
div class="span5"
h2 todo list:
div
table width=470 class="table-striped table-condensed table-bordered"
tr
th name
th description
th complete
-for item in @items do
div.row
div.span5
h2 todo list:
-unless @items.empty?
div
table.table-striped.table-condensed.table-bordered width=470
tr
th name
th description
th actions
= form_for @_item, :html => {:class => "well"}, url: items_path(@_item) do |form|
div
= form.label :name
= form.text_field :name
= form.label :description
= form.text_field :description
div
= submit_tag "add", :class => "btn"
%div.row
%div.span5
%h2 todo list:
- unless @items.empty?
%div
%table.table-striped.table-condensed.table-bordered{:style => "width:470"}
%tr
%th name
%th description
%th actions
= form_for @_item, :html => {:class => "well"}, url: items_path(@_item) do |form|
%div
= form.label :name
= form.text_field :name
= form.label :description
= form.text_field :description
%div
= submit_tag "add", :class => "btn"
class Location
def geocode
geocoded_address = GeocodedAddress.new(self.full_street_address)
self.latitude = geocoded_address.latitude
self.longitude = geocoded_address.longitude
return self
end
end
let(:location){FactoryGirl.create(:location)}
imagemagick: stable 6.8.0-10 (bottled), HEAD
http://www.imagemagick.org
Depends on: pkg-config, jpeg, libpng, libtool, fontconfig, freetype
/usr/local/Cellar/imagemagick/6.7.7-6 (1396 files, 32M) *
https://github.com/mxcl/homebrew/commits/master/Library/Formula/imagemagick.rb
==> Options
--with-fontconfig
Compile with fontconfig support.
--use-rsvg
Compile with librsvg support.
@joshskeen
joshskeen / gist:5042046
Created February 26, 2013 20:49
Keyword arguments test!
class TestFoo
def initialize(foo: nil, baz: nil, is_awesome: nil, this_ones_required: nil)
@foo = foo
@baz = baz
@is_awesome = is_awesome
@this_ones_required = this_ones_required or raise ArgumentError.new("this ones required!")
end
def to_s
"foo: #{@foo}, baz: #{@baz}, is_awesome: #{@is_awesome.to_s}, this_ones_required: #{@this_ones_required}"