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 'pp' | |
require 'rubygems' | |
require 'mechanize' | |
class MatrixInterface | |
CREDS = File.read("creds.txt").split(",") | |
def initialize | |
login_page = agent.get("http://reddirtrubyconf.com/login") |
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 'jruby/profiler' | |
profile_data = JRuby::Profiler.profile do | |
# code to be profiled.... | |
end | |
my_output_stream = java.io.ByteArrayOutputStream.new | |
print_stream = java.io.PrintStream.new(my_output_stream) | |
profile_printer = JRuby::Profiler::GraphProfilePrinter.new(profile_data) |
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 'rubygems' | |
require 'fsevents' | |
require 'fileutils' | |
STDOUT.sync = true | |
project = ARGV[0] || 'skweb' | |
options = { | |
:directory_to_watch => "/Users/danlucraft/Songkick/#{project}", |
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
/Users/danlucraft/Redcar/redcar/plugins/project/lib/project/find_recent_dialog.rb:11:in `selected': undefined local variable or method `path' for #<Redcar::Project::FindRecentDialog:0xc723e8> (NameError) | |
from /Users/danlucraft/Redcar/redcar/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb:188:in `selected' | |
from /Users/danlucraft/Redcar/redcar/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb:194:in `key_pressed' | |
from /Users/danlucraft/Redcar/redcar/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb:95:in `keyPressed' | |
from /Users/danlucraft/Redcar/redcar/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb:124:in `open' | |
from /Users/danlucraft/Redcar/redcar/plugins/application_swt/lib/application_swt/dialogs/filter_list_dialog_controller.rb:75:in `to_proc' | |
from /Users/danlucraft/Redcar/redcar/plugins/core/lib/core/observable.rb:1 |
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
# The Great Computer Language Shootout | |
# http://shootout.alioth.debian.org/ | |
# | |
# contributed by Gabriele Renzi | |
class PiDigitSpigot | |
def initialize() | |
@z = Transformation.new 1,0,0,1 | |
@x = Transformation.new 0,0,0,0 |
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
{ | |
"commands" : [ | |
{ | |
"name": "Up / of1-dev-dan", | |
"command": "rsync -rulz --delete --exclude=\".git\" --delete-excluded . of1-dev-dan:/home/dan/development/skweb", | |
"description": "Rsyncs up", | |
"type": "task/rsync" | |
}, | |
{ | |
"name": "Down / of1-dev-dan", |
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
class ProjectSearch | |
# This class discriminates between binary and textual data. | |
class BinaryDataDetector | |
# Is the data binary? | |
# | |
# @param [String] data | |
def self.binary?(data) | |
not textual?(data) | |
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
>> 60*60*24 | |
=> 86400 | |
>> 1.day | |
=> 1 day | |
>> 1.day.class | |
=> Fixnum |
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
class EditView | |
def highlight(offset, length, colour) | |
end | |
def clear_all_highlights | |
end | |
def clear_highlights_on_line(line_num) | |
end | |
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
Feature: Predictive macros | |
As a user | |
I want Redcar to read my mind | |
So I don't have to type stuff | |
Background: | |
When I open a new edit tab | |
Scenario: Repeat simple command sequence that is fully repeated | |
When I type "abab" |