Skip to content

Instantly share code, notes, and snippets.

@evolve2k
evolve2k / ActionMailer
Created August 23, 2011 03:07
Rails3 Mailer Cheat Sheet
ActionMailer::Base.deliveries.first
## DEFINE DIT ROOT/BASE/SUFFIX ####
## uses RFC 2377 format
## replace example and com as necessary below
## or for experimentation leave as is
## dcObject is an AUXILLIARY objectclass and MUST
## have a STRUCTURAL objectclass (organization in this case)
# this is an ENTRY sequence and is preceded by a BLANK line
dn: dc=example,dc=com
@evolve2k
evolve2k / frogger_rspec.rb
Created August 4, 2011 23:31
RSpec Frogger
require 'rspec/core/formatters/base_formatter'
class Frogger < RSpec::Core::Formatters::BaseFormatter
COLOR_START = "\e[34m" # blue
COLOR_FAILED = "\e[31m" # red
COLOR_PASSED = "\e[32m" # green
COLOR_PENDING = "\e[33m" # yellow
def initialize(output = nil)
@evolve2k
evolve2k / gist:1105816
Created July 26, 2011 02:38
Cucumber cheat sheet
Embed steps in other steps
--------------------------
When %{I am on the home page}
@evolve2k
evolve2k / gist:1094231
Created July 20, 2011 02:51
Fixing Cucumber & Rspec Textmate HTML Display issues
# A place to store all the various little fixes required to keep cucumber/rspec textmate HTML output working
### CUCUMBER ###################
# If it raises an error that radix is not found.
# Could not find radix- in any of the sources (Bundler::GemNotFound)
$ gem install radix # as a system gem
Make sure you are on a recent cucumber bundle.
@evolve2k
evolve2k / gist:1079562
Created July 13, 2011 01:37
Speeding up my mac book
/Library/LaunchDaemons
# remove things from here which I don't need pre launching
System Prefs > Accounts > Login Items
# Minus apps from here I don't want loading on startup
Activity Monitor
# Check to see what's using up the RAMs
@evolve2k
evolve2k / gist:1077086
Created July 12, 2011 00:05
What makes a good README
Notes from 'Xavier Shay's talk' - What makes a good README file (RORO 2010 Melbourne)
Use Symantic versioning (Major.Minor.Patch)
What
----
What prob u solving
How
---
@evolve2k
evolve2k / gist:1066540
Created July 6, 2011 04:02
Rails cheatsheet
# MODELS
# ------
# A contest has a host, which is actually a user record
has_one :host, :class_name => "User"
diff --git a/plugins/git.plugin.zsh b/plugins/git.plugin.zsh
index cbc40a2..d25c2eb 100644
--- a/plugins/git.plugin.zsh
+++ b/plugins/git.plugin.zsh
@@ -2,7 +2,7 @@
alias g='git st'
alias l='git log'
alias d='git diff'
-alias gl='git pull'
+#alias gl='git pull'
@evolve2k
evolve2k / gist:1059953
Created July 2, 2011 11:29
Updating your own authored gem
$ git commit # commit your changes like usual
$ rake version:bump:patch
$ rake gemspec # to update version to new version number, etc.
$ rake build # create the new gem package
# Commit the new gemspec file.
$ gem push pkg/<gemname_and_version>.gem # push to rubygems
$ git push # so that the githubs are all up to date!