Skip to content

Instantly share code, notes, and snippets.

View techpeace's full-sized avatar

Matt Buck techpeace

View GitHub Profile

Keybase proof

I hereby claim:

  • I am techpeace on github.
  • I am techpeace (https://keybase.io/techpeace) on keybase.
  • I have a public key whose fingerprint is 2275 9663 97AA 94B4 0D7C AD2E 4213 4E0C 9C4E 94BB

To claim this, I am signing this object:

@techpeace
techpeace / gist:4fa74fed5ec14ce15fe4
Created February 28, 2015 20:01
rvm ruby-2.2.0 installation bug
git:(master) brew update
Updated Homebrew from 440bc1cb to 2044cbe9.
==> New Formulae
purescript  sha2
==> Updated Formulae
fig			 homebrew/versions/gcc45  jack			   nghttp2		    pig			     solr		      typesafe-activatorgit:(master) brew upgrade readline
Error: readline 6.3.8 already installedgit:(master) rvm install 2.2.0
namespace :check do
desc "Check to make sure you haven't left any 'debugger' calls lying around."
task :debugger do
%w{app lib spec test}.each do |dir|
puts `ack debugger #{dir}`
puts `ack 'ruby-debug' #{dir}`
end
end
end
http://www.rightscale.com/lp/webinar/index.php?ls=Webinar&sd=Webinar_TestDev_Internal_062309&campaign=70170000000L5i2&campaign_status=Registered&utm_campaign=Webinar%3A%20How%20to%20Create%20Test%20%26%20Dev%20Environments%20on%20the%20Cloud&utm_content=mattbuck@capitalthought.com&utm_medium=Email&utm_source=VerticalResponse&utm_term=How%20to%20Create%20Secure%20Test%20and%20Development%20Environments%20on%20the%20Cloud
Feature: author manages posts

As an author

I want to be able to manage the posts on my blog

So that my audience can read my content


Background:

Given I am logged in as the following active author account:

| Name | Email address | Password | Phone number | Fax number |

| John | john@myvenue.com | pass | 555-555-1212 | 555-555-1213 |
 

desc "Alias for yarddoc task - rake yard is funnier"
task :yard do
Rake::Task['yardoc'].invoke
end
Surround a heredoc with quotes and you can continue the code on the same line:
render :status => 404, :text => <<-'EOH' and return unless setup
article not found<br/>
I, as a server, have failed<br/>
https?
EOH
@techpeace
techpeace / gist:180579
Created September 3, 2009 22:24 — forked from mtodd/gist:180398
Surround a heredoc with quotes and you can continue the code on the same line:
render :status => 404, :text => <<-'EOH' and return unless setup
article not found<br/>
I, as a server, have failed<br/>
https?
EOH
Quotes also give you more freedom/creativity with the terminal ID:
<h1>New product</h1>
Are you creating a new Product object in this action? Try this:
<%= @product.inspect %>
If nothing shows up, then you need a <pre>Product.new</pre> in this controller action.
<% form_for(@product) do |f| %>
<%= f.error_messages %>
# Method to assist in finding out what group a user is in
def in_group?(group_name)
self.user_groups.include?(UserGroup.find_by_name(group_name))
end