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
#Stories are embedded docs in a Feed | |
class Feed | |
include MongoMapper::Document | |
many :stories | |
end | |
class Story | |
include MongoMapper::EmbeddedDocument | |
key :title, String |
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
class SmartWorker < SimpleWorker::Base | |
merge "../../vendor/some_gem/lib/some_gem.rb" | |
def initialize(args={}) | |
args.each do |k, v| | |
instance_variable_set "@#{k.to_s}", v | |
instance_eval "class << self; attr_accessor :#{k.to_s}; end" | |
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
# create an extensions directory in models | |
# app/models/extensions/popular.rb | |
module Extensions | |
module Popular | |
extend ActiveSupport::Concern | |
# you can include other things here | |
included do | |
include Extensions::OtherCoolStuff |
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 RedisHelper | |
# decode Redis value back to Ruby object | |
def self.decode(json) | |
self.new(ActiveSupport::JSON.decode(json)["#{self.name.downcase}"]) | |
end | |
# encode Ruby object for Redis | |
def encoded | |
self.updated_at = nil | |
self.to_json |
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
# brew doctor output | |
We couldn't detect gcc 4.0.x. Some formulae require this compiler. | |
/usr/bin is in your PATH before Homebrew's bin. This means that system- | |
provided programs will be used before Homebrew-provided ones. This is an | |
issue if you install, for instance, Python. | |
Consider editing your .bashrc to put: | |
/usr/local/bin |
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
// ==UserScript== | |
// @name Growl Notifications with messages for campfire and fluid | |
// @namespace http://tim.theenchanter.com/ | |
// @description If your name is mentioned in a message, a growl notification shows what was said. | |
// @author Tim Harper | |
// @homepage http://tim.theenchanter.com/ | |
// @include *.campfirenow.com/room* | |
// ==/UserScript== | |
try { if ( typeof(Campfire) != "undefined" ) { |
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
defaults: &defaults | |
autocreate_indexes: false | |
allow_dynamic_fields: false | |
include_root_in_json: true | |
parameterize_keys: true | |
persist_in_safe_mode: true | |
raise_not_found_error: false | |
reconnect_time: 3 | |
# slaves: | |
# - host: slave1.local |
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
-----> Heroku receiving push | |
-----> Removing .DS_Store files | |
-----> Ruby/Rails app detected | |
/usr/local/lib/ruby/1.9.1/fileutils.rb:243:in `mkdir': Permission denied - /mnt/slug-compiler/language_packs/ruby/vendor (Errno::EACCES) | |
from /usr/local/lib/ruby/1.9.1/fileutils.rb:243:in `fu_mkdir' | |
from /usr/local/lib/ruby/1.9.1/fileutils.rb:217:in `block (2 levels) in mkdir_p' | |
from /usr/local/lib/ruby/1.9.1/fileutils.rb:215:in `reverse_each' | |
from /usr/local/lib/ruby/1.9.1/fileutils.rb:215:in `block in mkdir_p' | |
from /usr/local/lib/ruby/1.9.1/fileutils.rb:201:in `each' | |
from /usr/local/lib/ruby/1.9.1/fileutils.rb:201:in `mkdir_p' |
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
defaults: &defaults | |
autocreate_indexes: false | |
allow_dynamic_fields: false | |
include_root_in_json: true | |
parameterize_keys: true | |
persist_in_safe_mode: true | |
raise_not_found_error: false | |
reconnect_time: 3 | |
# slaves: | |
# - host: slave1.local |
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
This file contains any messages produced by compilers while | |
running configure, to aid debugging if configure makes a mistake. | |
It was created by PostgreSQL configure 9.1.1, which was | |
generated by GNU Autoconf 2.63. Invocation command line was | |
$ ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.1 --enable-thread-safety --with-bonjour --with-gssapi --with-krb5 --with-openssl --with-libxml --with-libxslt --with-ossp-uuid --datadir=/usr/local/Cellar/postgresql/9.1.1/share/postgresql --docdir=/usr/local/Cellar/postgresql/9.1.1/share/doc/postgresql | |
## --------- ## | |
## Platform. ## |
OlderNewer