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
| ORIG_PATH=$PATH | |
| USER_PATH=/usr/local/sbin:~/bin:/usr/X11R6/bin | |
| OPT_PATH=/opt/local/bin:/opt/local/sbin | |
| PG_PATH=/opt/local/lib/postgresql82/bin | |
| MYSQL_PATH=/opt/local/lib/mysql5/bin | |
| DEV_PATH=$OPT_PATH:$MYSQL_PATH:$PG_PATH:$PATH:$USER_PATH | |
| export PATH=$DEV_PATH |
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/bash | |
| sqlite3 -echo -bail ~/Library/Mail/Envelope\ Index vacuum; | |
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
| IRB.conf[:AUTO_INDENT] = true | |
| IRB.conf[:USE_READLINE] = true | |
| IRB.conf[:SAVE_HISTORY] = 1000 | |
| IRB.conf[:PROMPT_MODE] = :SIMPLE | |
| require 'rubygems' | |
| require 'irb/completion' | |
| require 'utility_belt' | |
| require 'pp' |
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
| ActionController::Base.asset_host = Proc.new { |source| | |
| source.starts_with?('/images') ? "liveorproductionapp.tld" : nil | |
| } |
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
| // =================================== | |
| // = Bullet Proof Popups, 1997 style = | |
| // =================================== | |
| Popup: { | |
| base: function(url, options, popupName){ | |
| popupName = window.open(url,popupName,options); | |
| if (popupName){ | |
| if (popupName.focus) popupName.focus(); | |
| } | |
| return false; |
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 "echo TODO > README" | |
| generate :nifty_layout | |
| puts "configuring gems" | |
| gem "sqlite3-ruby", :lib => "sqlite3" | |
| gem 'haml' | |
| gem "fastercsv", :lib => false | |
| gem 'vlad', :lib => false | |
| gem 'vlad-git', :lib => false |
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
| class ArticlesController < ApplicationController | |
| # GET /articles | |
| # GET /articles.xml | |
| def index | |
| @articles = Article.all | |
| respond_to do |format| | |
| format.html # index.html.erb | |
| format.xml { render :xml => @articles } | |
| 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
| Xms512m -Xmx512m -XX:MaxPermSize=256m -XX:+UseParallelGC -XX:ParallelGCThreads=4 -XX:+UseAdaptiveSizePolicy -Xbootclasspath/a:../lib/boot.jar -ea |
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
| class DebugController < ApplicationController | |
| # Many Thanks to Jens Himmelreich for the Idea! | |
| def heapdump | |
| living_objects = Hash.new 0 | |
| file_path = timestamp_filepath | |
| ObjectSpace.each_object do |object| | |
| living_objects[object.class] += 1 | |
| end | |
| sorted_array = living_objects.sort{|a,b| b[1] <=> a[1] } | |
| File.open(file_path, 'w') do |file| |
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
| # usage: rails new MY_NEW_APP -J -T -m <http://URL.of.this.file> | |
| # Helpers | |
| def git_update(message) | |
| git :add => ".", :commit => "-m '#{message}'" | |
| end | |
| def git_remove(file) | |
| git :rm => file |
OlderNewer