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
File Settings - User: | |
{ | |
"caret_style": "blink", | |
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
"draw_indent_guides": true, | |
"indent_guide_options": ["draw_normal", "draw_active", "draw_stack", | |
"normal_stippled", "stack_stippled", "active_stippled"], | |
"draw_white_space": "all", | |
"font_face": "Menlo", | |
"font_size": 16, |
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 'test/unit' | |
class FooTest < Test::Unit::TestCase | |
def setup | |
# puts "Do stuff before tests" | |
@foo = 'messages.csv' | |
@lines = download_export('a', 'b', 'c') | |
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
~/dev/ruby-etherpad-lite% rspec spec [master] | |
***************************************************************** | |
DEPRECATION WARNING: you are using a deprecated constant that will | |
be removed from a future version of RSpec. | |
/opt/ruby-enterprise-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' | |
* Rspec is deprecated. | |
* RSpec is the new top-level module in RSpec-2 | |
*************************************************************** |
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
// Create iframe | |
// TODO: ACC add the appropriate description on this. | |
n = DOM.add(o.iframeContainer, 'iframe', { | |
id : t.id + "_ifr", | |
src : u || 'javascript:""', // Workaround for HTTPS warning in IE6/7 | |
frameBorder : '0', | |
allowTransparency : "true", | |
title : s.aria_label, | |
style : { | |
width : '100%', |
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
TypeError in Groups#show | |
Showing app/views/layouts/_nav_menu.html.erb where line #207 raised: | |
class ActiveRecord::Associations::BelongsToAssociation needs to have method `_load' | |
Extracted source (around line #207): | |
204: | |
205: <li> | |
206: <ul class="ymodules-nav-list yj-hidden-nav"> |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
# Usage: run_tests user group network | |
pwd = Dir.pwd | |
finder_args = ARGV.map{|s| %Q(-name "*#{s}*_test.rb") }.join(' -or ') | |
test_paths = `find test -type d -maxdepth 1 -mindepth 1`.split("\n") |
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
def fuck_my_transaction | |
begin | |
ActiveRecord::Base.connection.begin_db_transaction | |
# Raise any error except an AR::StatementInvalid, such as an ActiveRecord::Rollback, | |
# which is generally used to signal a rollback condition | |
raise ActiveRecord::Rollback.new("Fucking your transaction.") | |
rescue ActiveRecord::StatementInvalid | |
puts "Rescued, rolling back..." | |
ActiveRecord::Base.connection.rollback_db_transaction | |
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
** [out :: foo-001.] 87043105 Apr 5 21:33 /opt/workfeed/current/log/starboard_journal.log | |
** [out :: foo-002.] 88476119 Apr 5 21:01 /opt/workfeed/current/log/starboard_journal.log | |
** [out :: foo-003.] 88131289 Apr 5 21:30 /opt/workfeed/current/log/starboard_journal.log | |
** [out :: foo-004.] 86869486 Apr 5 21:26 /opt/workfeed/current/log/starboard_journal.log | |
** [out :: foo-005.] 67529684 Apr 5 20:46 /opt/workfeed/current/log/starboard_journal.log | |
** [out :: foo-006.] 89022804 Apr 5 21:38 /opt/workfeed/current/log/starboard_journal.log | |
** [out :: foo-007.] 88658473 Apr 5 21:00 /opt/workfeed/current/log/starboard_journal.log | |
** [out :: foo-008.] 88145813 Apr 5 20:46 /opt/workfeed/current/log/starboard_journal.log | |
** [out :: foo-009.] 88741158 Apr 5 21:00 /opt/workfeed/current/log/starboard_journal.log |
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
# Simple a/b test | |
experiment :signup_start_right_now do |exp| | |
exp.description 'Show a 5th signup step' | |
exp.ends_at '1 Jul 2011 00:00:00' | |
exp.control '50%', :with => 'show start step', :returning => false | |
exp.treat '50%', :with => 'do not show start step', :returning => true | |
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
#!/usr/bin/env sh | |
# Kill connections | |
ps -u postgres|grep "postgres: postgres yam_development"|awk '{print $2}'|xargs sudo -u postgres kill -s SIGQUIT | |
ps -u postgres|grep "postgres: postgres yam_test" |awk '{print $2}'|xargs sudo -u postgres kill -s SIGQUIT | |
# Wait for db processes to stop | |
sleep 5 | |
psql84 -Upostgres -c 'DROP DATABASE yam_development' |
NewerOlder