This file contains hidden or 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 ApplicationHelper | |
| def inside_layout(layout, &block) | |
| @template.instance_variable_set("@content_for_layout", capture(&block)) | |
| layout = layout.to_s.include?("/") ? layout : "layouts/#{layout}" if layout | |
| buffer = eval("_erbout", block.binding) | |
| buffer.concat(@template.render(:file => layout)) | |
| end | |
| end |
This file contains hidden or 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
| Responses to http://twitter.com/malcolli/status/1494274656 | |
| 1. Supergrass - Alright | |
| No idea | |
| 2. It's Tricky - Run DMC | |
| Not Road Trip.. that was 2000... hrmmm | |
| 3. The Man in Me - Bob Dylan | |
| No idea |
This file contains hidden or 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
| # Assume the app name is the current dir name | |
| application = File.basename(Dir.pwd) | |
| # Create the repository | |
| run 'rm -rf .git' if File.exists?('.git') && yes?("This folder already has a git repository. Would you like to delete it?") | |
| git :init | |
| # Create the deploy file | |
| file "config/deploy.rb", <<-FILE | |
| set :application, "#{application}" |
This file contains hidden or 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
| # suspenders.rb | |
| # from Nathan Esquenazi | |
| # based on Suspenders by Thoughtbot | |
| #==================== | |
| # PLUGINS | |
| #==================== | |
| plugin 'hoptoad_notifier', :git => "git://github.com/thoughtbot/hoptoad_notifier.git" | |
| plugin 'squirrel', :git => "git://github.com/thoughtbot/squirrel.git" |
This file contains hidden or 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
| # suspenders.rb | |
| # from Nathan Esquenazi | |
| # based on Suspenders by Thoughtbot | |
| #==================== | |
| # PLUGINS | |
| #==================== | |
| plugin 'hoptoad_notifier', :git => "git://github.com/thoughtbot/hoptoad_notifier.git" | |
| plugin 'squirrel', :git => "git://github.com/thoughtbot/squirrel.git" |
This file contains hidden or 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 app name | |
| app_name = ask("What's the name of your app?") | |
| # clean up files | |
| run "rm -rf public/javascripts/* public/stylesheets" | |
| # compass | |
| run "compass --rails . -f 960 -r ninesixty" | |
| # git setup |
This file contains hidden or 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
| Test |
This file contains hidden or 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
| # RSpec matcher to spec serialized ActiveRecord attributes. | |
| # | |
| # Usage: | |
| # | |
| # describe Post do | |
| # it { should serialize(:data) } # serialize :data | |
| # it { should serialize(:registers).as(Array) } # serialize :registers, Array | |
| # it { should serialize(:options).as(Hash) } # serialize :options, Hash | |
| # end |
This file contains hidden or 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/ohai/plugins/rackspace.rb b/lib/ohai/plugins/rackspace.rb | |
| index ee44065..0812206 100644 | |
| --- a/lib/ohai/plugins/rackspace.rb | |
| +++ b/lib/ohai/plugins/rackspace.rb | |
| @@ -36,7 +36,7 @@ end | |
| def has_rackspace_mac? | |
| network[:interfaces].values.each do |iface| | |
| unless iface[:arp].nil? | |
| - return true if iface[:arp].value?("00:00:0c:07:ac:01") | |
| + return true if iface[:arp].value?("00:00:0c:07:ac:01") or iface[:arp].value?("00:00:0c:9f:f0:01") |
This file contains hidden or 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 "fog" | |
| require "nokogiri" | |
| def name | |
| @name ||= new_resource.name + "." | |
| end | |
| def value | |
| @value ||= new_resource.value | |
| end |
OlderNewer