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 Helpers | |
def udpate_total(total) | |
@total.clear { para "Total: " + currencify(total) } | |
end | |
end | |
Shoes.app do | |
extend Helpers | |
@s = stack do | |
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
module Helpers | |
def udpate_total(total) | |
@total.clear { para "Total: " + currencify(total) } | |
end | |
end | |
Shoes.app do | |
extend Helpers | |
@s = stack do | |
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
require 'open-uri' | |
require 'test/unit' | |
class WhenDoITest < Test::Unit::TestCase | |
def test_all_the_fucking_time | |
body = open("http://whendoitest.com").read | |
assert_match(/All The Fucking Time/,body) | |
end | |
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
<%= form_for @product, :action => url(:product,@product) do %> | |
<% 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
require 'rubygems' | |
require 'open-uri' | |
vids = [] | |
f = open('http://feeds.feedburner.com/Rubyconf2008-Confreaks') | |
f.each do |l| | |
l =~ /enclosure url=\"([^\"]+)"/ | |
vids << $1 | |
end | |
vids.compact!.uniq! |
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
need a test for embedding |
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
diff --git a/center.applescript b/center.applescript | |
index 3049271..0dc2ec1 100644 | |
--- a/center.applescript | |
+++ b/center.applescript | |
@@ -44,7 +44,7 @@ tell application "System Events" | |
on error | |
set {w, h} to {0, 0} | |
end try | |
- set position of window 1 to {((screen_width - windowWidth) / 2), ((screen_height - windowHeight) / 2.0) - | |
+ set position of window 1 to {(((screen_width - windowWidth) / 2) + w), ((screen_height - windowHeight) / 2 |
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
#make dock really really small | |
defaults write com.apple.dock tilesize -int 1 |
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
diff --git a/lib/merb-core/controller/mixins/controller.rb b/lib/merb-core/controller/mixi | |
index 81e5e39..a8ae923 100644 | |
--- a/lib/merb-core/controller/mixins/controller.rb | |
+++ b/lib/merb-core/controller/mixins/controller.rb | |
@@ -125,7 +125,7 @@ module Merb | |
# redirect("http://www.merbivore.com/") | |
# redirect("http://www.merbivore.com/", :permanent => true) | |
def redirect(url, opts = {}) | |
- default_redirect_options = { :message => nil, :permanent => false } | |
+ default_redirect_options = { :message => message.empty? ? nil : message ,:permanent |
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
#!/usr/bin/ruby | |
__DIR__ = File.join(File.dirname(__FILE__),"..") | |
framework = File.join(__DIR__,"framework") | |
if File.directory?(framework) | |
puts "Running from frozen framework" | |
core = File.join(framework,"merb-core") | |
if File.directory?(core) |