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
* keep people working on internal projects, assign and schedule the work | |
* dont look desperate, dont have immediate availability | |
* can tell a client you can 'shuffle internal projects' to accomodate them | |
* online ads dont work well | |
* referrals instead | |
* do a great job every single time | |
* voice calls important | |
* when people call you call them back |
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
# mongo_template.rb | |
# fork of Ben Scofield's Rails MongoMapper Template (http://gist.github.com/181842) | |
# | |
# To use: | |
# rails project_name -m http://gist.github.com/gists/219223.txt | |
# remove unneeded defaults | |
run "rm public/index.html" | |
run "rm public/images/rails.png" | |
run "rm public/javascripts/controls.js" |
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
## | |
# $ rails example.com -m http://tr.im/typus_example | |
## | |
# Install Typus and friends. | |
plugin 'typus', :git => 'git://github.com/fesplugas/typus.git' | |
plugin 'acts_as_list', :git => 'git://github.com/rails/acts_as_list.git' | |
plugin 'acts_as_tree', :git => 'git://github.com/rails/acts_as_tree.git' | |
plugin 'paperclip', :git => 'git://github.com/thoughtbot/paperclip.git' |
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
#---------------------------------------------------------------------------- | |
# Git Setup | |
#---------------------------------------------------------------------------- | |
file '.gitignore', <<-FILE | |
.DS_Store | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
db/*.sqlite3 | |
public/uploads/* |
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
require 'action_controller/test_process' | |
# Paperclip attachments in factories, made easy based on technicalpickles | |
Factory.class_eval do | |
def attach(name, path, content_type = nil) | |
if content_type | |
add_attribute name, ActionController::TestUploadedFile.new("#{RAILS_ROOT}/#{path}", content_type) | |
else | |
add_attribute name, ActionController::TestUploadedFile.new("#{RAILS_ROOT}/#{path}") | |
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
## | |
# CarrierWave Amazon S3 File Reprocessor Rake Task | |
# | |
# Written (specifically) for: | |
# - CarrierWave | |
# - Ruby on Rails 3 | |
# - Amazon S3 | |
# | |
# Works with: | |
# - Any server of which you have write-permissions in the Rails.root/tmp directory |
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
map = [ | |
"âãäåāăąÁÂÃÄÅĀĂĄèééêëēĕėęěĒĔĖĘĚìíîïìĩīĭÌÍÎÏÌĨĪĬóôõöōŏőÒÓÔÕÖŌŎŐùúûüũūŭůÙÚÛÜŨŪŬŮñÑçÇüÜ".mb_chars, | |
"aaaaaaaaaaaaaaaeeeeeeeeeeeeeeeiiiiiiiiiiiiiiiiooooooooooooooouuuuuuuuuuuuuuuunnccuu" | |
] | |
# ActiveSupport::Multibyte::Chars#tr broken? | |
word = "anything" | |
adapted_word = "%#{word.mb_chars.split(//).map {|e| (p = map[0].index(e)) ? map[1][p,1] : e.to_s }.join.downcase}%" | |
Post.where("lower(translate(title, '#{map[0]}', '#{map[1]}')) like #{Post.connection.quote word}") |
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 Rails template will generate a Rails 3 (MASTER) application, with MongoDB as ORM and Devise for authentication. | |
# You will require ruby 1.9.2-HEAD to run generated app. | |
file 'Gemfile', <<-GEMS | |
source 'http://gemcutter.org' | |
gem "rails", :git => "git://github.com/rails/rails.git" | |
gem "mongoid", "2.0.0.beta4" | |
gem "bson_ext", "0.20.1" | |
gem "inherited_resources" | |
gem "devise", :git => "git://github.com/plataformatec/devise.git" |
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
Capistrano::Configuration.instance(:must_exist).load do | |
namespace :git do | |
task :warn_unpushed_changes do | |
master_rev = `git rev-parse master`.strip | |
origin_master_rev = `git rev-parse origin/master`.strip | |
if master_rev != origin_master_rev | |
puts "*" * 80 | |
answer = Capistrano::CLI.ui.ask(" You have local commits that have yet to be pushed to origin. Continue? (y/N)") | |
exit(1) unless answer.downcase == 'y' |
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
# using rvm with ruby-1.8.7-p249 | |
# latest version 2.7.7 2010-06-17 | |
brew install libxml2 | |
# installing libxslt from source code | |
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz | |
tar xvfz libxslt-1.1.26.tar.gz | |
cd libxslt-1.1.26 | |
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7 |
OlderNewer