https://github.com/cldwalker/debugger
gem install debugger
In ~/.rdebugrc (You'll want to set these)
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'highline/import' | |
require 'open-uri' | |
conversions = [ | |
["<blockquote>", '[q]' ], | |
["</blockquote>", '[/q]' ], |
PATH=$HOME/.rvm/bin:/usr/local/bin:/usr/local/sbin:$PATH # Add RVM to PATH for scripting | |
if [ -d ~/bin ]; then | |
echo "$PATH" | grep -q "$HOME/bin:" || export PATH="$HOME/bin:$PATH" | |
fi | |
if [ -f $HOME/.inputrc ]; then | |
export INPUTRC="$HOME/.inputrc" | |
fi |
require Sufia::Engine.config.root + 'app' + 'controllers' + 'dashboard_controller' | |
class DashboardController | |
def index | |
# And now index is overridden | |
end | |
end |
https://github.com/cldwalker/debugger
gem install debugger
In ~/.rdebugrc (You'll want to set these)
<!-- Found in /app/views/topics/index.html.erb --> | |
<h1>Listing topics</h1> | |
<table> | |
<tr> | |
<th></th> | |
<th></th> | |
<th></th> | |
<th></th> | |
</tr> |
should 'does not halt callbacks when a non-true result is encountered' do | |
@mum.class.after_eight { :before_failure } | |
@mum.class.after_eight { false } | |
@mum.class.after_eight { :after_failure } | |
results = @mum.run_hook(:after_eight) | |
assert_equal [:before_failure, false, :after_failure], results | |
end |
[alias] | |
branch-current = rev-parse --symbolic-full-name --abbrev-ref HEAD | |
number-of-commits-since-master = "! sh -c 'git log master..`git branch-current` --oneline | wc -l | tr -d \" \"'" | |
squash = "! sh -c 'git rebase --interactive HEAD~`git number-of-commits-since-master`'" |
#!/usr/bin/env ruby -w | |
# This script assumes your Repositories are in ~/Repositories and your Sublime Projects are in ~/Projects | |
project_name = ARGV[0] | |
if !project_name && ENV['PWD'] | |
project_name = ENV['PWD'].split("/").last | |
end | |
if project_name |
#!/usr/bin/env rake | |
begin | |
require 'bundler/setup' | |
rescue LoadError | |
puts 'You must `gem install bundler` and `bundle install` to run rake tasks' | |
end | |
# I want these tasks local to the project, not in Rake's 'app' namespace | |
Dir.glob('tasks/*.rake').each { |r| import r } |
# The below script attempts to automate the character encoding challenges | |
# encountered with mysql, latin1 and UTF8 | |
# http://www.bluebox.net/news/2009/07/mysql_encoding/ | |
# ============================================================================== | |
# Copyright © 2013 University of Notre Dame | |
# Additional copyright may be held by others, as reflected in the commit history. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. |