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
#!/bin/sh | |
svn remove log/* | |
svn commit -m"removing log files" | |
svn propset svn:ignore "*.log" log/ | |
svn update log/ | |
svn commit -m 'Ignoring all files in /log/ ending in .log' | |
svn move config/database.yml config/database.example | |
svn commit -m 'Moving database.yml to database.example to provide a template for anyone who checks out the code' | |
svn propset svn:ignore "database.yml" config/ | |
svn update config/ |
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 "thor/shell" | |
say("Modifying a new Rails app ...", :yellow) | |
#---------------------------------------------------------------------------- | |
# Configure | |
#---------------------------------------------------------------------------- | |
=begin | |
unless options[:database] == 'sqlite3' | |
username = ask("What's your database username[root]") | |
username = 'root' if username.blank? |
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
# To show SQL Statements in the rails console | |
# copy this code to ~/.irbrc | |
# code found there http://frozenplague.net/2008/12/showing-sql-statements-in-scriptconsole/ | |
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER') | |
require 'logger' | |
RAILS_DEFAULT_LOGGER = Logger.new(STDOUT) | |
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
require 'rubygems' | |
require 'wirble' | |
Wirble.init | |
Wirble.colorize | |
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER') | |
require 'logger' | |
RAILS_DEFAULT_LOGGER = Logger.new(STDOUT) | |
end | |
IRB.conf[:IRB_RC] = proc do |conf| |
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
#!/bin/sh | |
# Install ImageMagick on Snow Leopard: by kain, improved by mislav and samsoffes | |
# http://www.icoretech.org/2009/08/install-imagemagick-in-leopard-snow-leopard/ | |
# Work with 64bit kernel mode | |
set -e | |
PREFIX=/usr/local | |
# Passenger users: amend your Apache global configuration with the following directive | |
# SetEnv PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin |
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
Full Gem List Deployed in ruby applications monitored by New Relic, September 2011 | |
Count Gem Name | |
---------------- | |
7570 rack | |
7444 rake | |
7425 rails | |
7424 activesupport | |
7421 bundler | |
7412 actionpack |
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
Full Plugin List Deployed in Rails applications monitored by New Relic, September 2011 | |
Count Plugin Name | |
------------------- | |
2040 rpm | |
1534 newrelic_rpm | |
1268 acts_as_list | |
1186 paperclip | |
1130 will_paginate | |
1068 exception_notification |
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
# Install ruby 1.8.7 -p299 | |
sudo mkdir /usr/local/src | |
cd /usr/local/src | |
sudo curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p299.tar.gz | |
sudo tar xzvf ruby-1.8.7-p299.tar.gz | |
cd ruby-1.8.7-p299 | |
sudo ./configure --enable-shared --enable-pthread | |
sudo make | |
sudo make install | |
cd ext/zlib |
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
#!/usr/bin/ruby | |
require 'rss' | |
p 'Downloading rss index' | |
rss_string = open('http://feeds.feedburner.com/railscasts').read | |
rss = RSS::Parser.parse(rss_string, false) | |
videos_urls = rss.items.map { |it| it.enclosure.url }.reverse | |
videos_filenames = videos_urls.map {|url| url.split('/').last } |
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
## Apache Load Balancer Front End ## | |
# Puppet Apache::Config[010_frontend_puppet_prod.conf] | |
# This file managed by Puppet from a template. | |
# source: puppet_frontend_XXXX.conf | |
# All CA requests should be directed to specific workers | |
<Proxy balancer://puppet_prod_ca> | |
# Only one member | |
BalancerMember http://puppetca.puppetlabs.vm:18140 |
OlderNewer