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
# environment variables | |
export PATH=/usr/local/bin:$PATH | |
export PATH="$HOME/bin:$PATH" | |
export PATH=/usr/local/git/bin:$PATH | |
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" | |
export MANPATH=/usr/local/git/man:$MANPATH | |
export EDITOR="mate -w" | |
export SVN_EDITOR="mate -w" | |
# aliases |
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
# Short circuit a deliver_* methods defined in ActionMailer::Base subclasses. | |
def do_not_deliver! | |
def self.deliver! ; false ; 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
development: &non-production | |
adapter: mysql | |
database: example_development | |
username: root | |
password: | |
host: localhost | |
timeout: 5000 | |
test: | |
<<: *non-production |
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
Rails::Initializer.run do |config| | |
%w(observers sweepers mailers).each do |dir| | |
config.load_paths << "#{RAILS_ROOT}/app/#{dir}" | |
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
-- most active questions in the last 7 days | |
select q.question, q.created_at as asked_on, count(1) as answers from answers a, questions q where a.question_id=q.id and a.created_at>SUBDATE(CURRENT_DATE(), INTERVAL 7 DAY) group by a.question_id order by answers desc, asked_on desc |
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
--most referred questions in the past 7 days | |
select q.question, q.created_at as asked_on,count(1) as referrals from question_referrals r, questions q where r.question_id=q.id and r.created_at>SUBDATE(CURRENT_DATE(), INTERVAL 7 DAY) group by r.question_id order by referrals desc, asked_on desc |
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
select p.screen_name, avg(a.best_answer)*100 as best_answer_percentage from answers a, profiles p where a.profile_id = p.id group by p.screen_name order by best_answer_percentage desc |
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
has: function(selector) { | |
var $this = this; | |
return $this.find(selector).length > 0 | |
}, |
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
$(document).ready(function($) { | |
var $div = $('<div style="height: 1px; min-height: 2px; position: absolute; top: -100px; left: -100px;"/>').appendTo('body'); | |
$.support.minHeight = !!( $div[0].offsetHeight && $div[0].offsetHeight == 2 ); | |
$div.remove(); | |
}); |
OlderNewer