Skip to content

Instantly share code, notes, and snippets.

View jackdempsey's full-sized avatar

jack dempsey jackdempsey

View GitHub Profile
diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb
index 1d6a2de..f0d9d95 100644
--- a/railties/lib/rails/railtie.rb
+++ b/railties/lib/rails/railtie.rb
@@ -70,7 +70,7 @@ module Rails
#
# class MyRailtie < Rails::Railtie
# initializer "my_railtie.configure_rails_initialization" do |app|
- # app.middlewares.use MyRailtie::Middleware
+ # app.middleware.use MyRailtie::Middleware
diff --git a/vendor/plugins/fetcher/lib/fetcher/imap.rb b/vendor/plugins/fetcher/lib/fetcher/imap.rb
index c0d0c72..fe8d3d3 100644
--- a/vendor/plugins/fetcher/lib/fetcher/imap.rb
+++ b/vendor/plugins/fetcher/lib/fetcher/imap.rb
@@ -52,7 +52,8 @@ module Fetcher
handle_bogus_message(msg)
end
# Mark message as deleted
- @connection.uid_store(uid, "+FLAGS", [:Seen, :Deleted])
+ #@connection.uid_store(uid, "+FLAGS", [:Seen, :Deleted])
#!/bin/sh
set -e
die()
{
echo "fatal: $@" >&2
exit 1
}
~/.rvm > find . -name '*gz'
./archives/libiconv-1.13.1.tar.gz
./archives/rubinius-1.0.0-20100514.tar.gz
./archives/rubinius-1.0.0-rc2-20100104.tar.gz
./archives/ruby-1.8.7-p174.tar.gz
./archives/ruby-1.8.7-p248.tar.gz
./archives/ruby-1.9.2-preview3.tar.gz
./archives/ruby-enterprise-1.8.7-2010.01.tar.gz
./archives/rubygems-1.3.5.tgz
./archives/rubygems-1.3.7.tgz
def rem(string=nil)
storage_file = ENV['HOME'] + '/.remembered_commands'
if string == :clear
File.unlink(storage_file)
elsif string
File.open(storage_file,'a') do |f|
f.puts string
end
else
File.read(storage_file)
before
share/man > pwd
/usr/local/share/man
share/man > l
total 16
drwxr-xr-x 3 root wheel 102B Dec 4 2009 de/
drwxrwxr-x 48 root wheel 1.6K Dec 4 2009 man1/
drwxr-xr-x 6 root wheel 204B Dec 4 2009 man3/
drwxr-xr-x 3 root wheel 102B Dec 4 2009 man5/
[alias]
ci = commit
st = status
co = checkout
lc = log ORIG_HEAD.. --stat --no-merges
sb = show-branch
mg = merge
wu = log origin/master..
pop = reset head^
squish = commit -a --amend -C HEAD
We couldn’t find that file to show.
# map/reduce conditions with meta_where and rails 3
# syntax explanation at http://github.com/ernie/meta_where
scope :match, lambda { |term| where([:title,:description,:keywords].map{|col| col.matches % "%#{term}%"}.inject(&:|))}
class Ability
include CanCan::Ability
def initialize(user)
can [:read, :sort], Feature do |feature|
# below is turning into an idiom for me, one I sometimes forget about.
# thoughts on a better way to expose the "if we have an instance, use this check, else grant access to read/sort the Feature class"
(feature && feature.project.has_user?(user)) || true
end
end