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
# app/views/layouts/application.html.erb | |
<% head_style 'styles' %> | |
<% head_javascript 'application' %> | |
<%= render :file => 'layouts/rails_admin/main' %> |
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
filenames = Dir.glob(Rails.application.paths.app.models.collect { |path| File.join(path, "**/*.rb") }) | |
$class_names = [] | |
filenames.each do |filename| | |
$class_names += File.read(filename).scan(/class ([\w\d_\-:]+)/).flatten | |
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
# hack to rvm invoke .rvmrc | |
cd_with_pushd() | |
{ | |
if [ $# -eq 0 ]; then | |
DIR="${HOME}" | |
else | |
DIR="$1" | |
fi | |
pushd "${DIR}" |
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 'rubygems' | |
require 'sinatra' | |
require 'pony' | |
require 'haml' | |
set :haml, {:format => :html5} | |
set :public, File.dirname(__FILE__) | |
set :views, File.dirname(__FILE__) | |
# Create the page class and give it a title of Contact for the layout |
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 |
NewerOlder