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
group :livereload do | |
guard 'livereload' do | |
watch(things) | |
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
Gem::Specification.new do |s| | |
s.name = 'mongoid-accepts_embedded_resource_for' | |
s.version = '0.1.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'John Bintz' | |
s.email = '[email protected]' | |
s.summary = 'Add accepts_embedded_resources_for to Mongoid::NestedAttributes, so it plays nicer with Carrierwave and embedded documents' | |
s.description = 'Add accepts_embedded_resources_for to Mongoid::NestedAttributes, so it plays nicer with Carrierwave and embedded documents' | |
s.files = ['mongoid-accepts_embedded_resource_for.rb'] |
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
Gem::Specification.new do |s| | |
s.name = 'draper-mongoid' | |
s.version = '0.1.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'John Bintz' | |
s.email = '[email protected]' | |
s.summary = 'Quick little hack to make Mongoid work with Draper wrt model_name' | |
s.description = 'Quick little hack to make Mongoid work with Draper wrt model_name' | |
s.files = ['draper-mongoid.rb'] |
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 'delegate' | |
class Presenter < SimpleDelegator | |
def self.model_name | |
@_model_name ||= ActiveModel::Name.new(self.name.gsub('Presenter', '').constantize) | |
end | |
def self.for(objects) | |
objects.collect { |item| (item.class.name + "Presenter").constantize.new(item) } | |
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
Gem::Specification.new do |s| | |
s.name = 'add_t' | |
s.version = '0.1.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'John Bintz' | |
s.email = '[email protected]' | |
s.summary = 'Filter JavaScript files for %{path} and replace it with the logical Sprockets path.' | |
s.description = 'Filter JavaScript files for %{path} and replace it with the logical Sprockets path.' | |
s.files = ['add_t.rb'] |
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
Gem::Specification.new do |s| | |
s.name = 'wait_for_port' | |
s.version = '0.1.0' | |
s.platform = Gem::Platform::RUBY | |
s.author = 'John Bintz' | |
s.email = '[email protected]' | |
s.summary = 'Wait for a port to be open or not open.' | |
s.description = 'Wait for a port to be open or not open.' | |
s.files = ['wait_for_port.rb'] |
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
# brew doctor | |
Your system is raring to brew. | |
# brew --config | |
HOMEBREW_VERSION: 0.9.2 | |
HEAD: a320ba2b7aa2a19b5a0f81a03329af2d95b91130 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar |
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/common.mk b/common.mk | |
index eb89a2b..59cdfe4 100644 | |
--- a/common.mk | |
+++ b/common.mk | |
@@ -630,7 +630,8 @@ file.$(OBJEXT): {$(VPATH)}file.c $(RUBY_H_INCLUDES) {$(VPATH)}io.h \ | |
gc.$(OBJEXT): {$(VPATH)}gc.c $(RUBY_H_INCLUDES) {$(VPATH)}re.h \ | |
{$(VPATH)}regex.h $(ENCODING_H_INCLUDES) $(VM_CORE_H_INCLUDES) \ | |
{$(VPATH)}gc.h {$(VPATH)}io.h {$(VPATH)}eval_intern.h {$(VPATH)}util.h \ | |
- {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h | |
+ {$(VPATH)}debug.h {$(VPATH)}internal.h {$(VPATH)}constant.h \ |
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
# For Debian Squeeze + Backports + OpenSSL 1.0.0 | |
# Part 1: Make a deb package of ruby: | |
# Get our deps | |
sudo su -c "echo deb http://backports.debian.org/debian-backports squeeze-backports main > /etc/apt/sources.list.d/squeeze-backports.list" | |
sudo apt-get update | |
sudo apt-get install -y python-setuptools python-dev build-essential dpkg-dev libopenssl-ruby ruby1.8-dev rubygems bison autoconf zlib1g zlib1g-dev libreadline6 libreadline6-dev libssl1.0.0 libssl-dev | |
# Get ruby | |
if [ ! -f ruby-1.9.3-p327.tar.gz ]; then |
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
# run flay on your cucumber steps after a successful run. prevent bloat and | |
# promote reusability! | |
flay_exception = nil | |
flay_level = 32 # set me to a minimum sane level. don't go nuts refactoring! | |
# code should be cleaner when you're done, not become spaghetti. | |
After do |s| | |
flay_exception ||= s.exception | |
end |