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
@BeforeClass | |
public void setupOnce() { | |
try { | |
autocompleter = new String(FileUtility.readFully("input/autocompleter.rb")); | |
indenter = new String(FileUtility.readFully("input/indenter.rb")); | |
snippetInserter = new String(FileUtility.readFully("input/snippet_inserter.rb")); | |
String[] patterns = { | |
"\\\\(?:0\\d{1,2}|x[\\da-fA-F]{1,2}|.)", "(#\\$)[a-zA-Z_]\\w*", |
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
$ jruby -J-XstartOnFirstThread lib/env.rb | |
Feature: Menu bar should appear | |
Scenario: whuh | |
Then the browser should be viewing the url "http://www.google.co.uk/" | |
1 scenario (1 passed) | |
1 step (1 passed) | |
0m0.011s |
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
module Monitoring | |
class Act < ActiveRecord::Base | |
validates_presence_of :details | |
serialize :details | |
end | |
end | |
@it = Monitoring::Act.new(:details => {:foo => "bar"}) | |
p @it |
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
module Cucumber | |
module Formatter | |
class SwtFormatter < Pretty | |
# step must execute in the correct thread: | |
def visit_step(*) | |
block = RRunnable.new do | |
super | |
end | |
Redcar::ApplicationSWT.display.syncExec(block) |
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
w keyCode: 119, character: 119, statemask: 0 | |
Shift+w keyCode: 119, character: 87, statemask: 131072 | |
Ctrl+w keyCode: 119, character: 23, statemask: 262144 | |
Alt+w keyCode: 119, character: 8721, statemask: 65536 | |
Cmd+w keyCode: 119, character: 119, statemask: 4194304 | |
key character | |
Alt+a 229 | |
Alt+b 8747 | |
Alt+c 231 |
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 foo | |
foo | |
end | |
def bar | |
begin | |
foo | |
rescue => e | |
p :caught | |
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
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
[remote "origin"] | |
fetch = +refs/heads/*:refs/remotes/origin/* | |
url = git@github.com:danlucraft/redcar.git | |
[branch "master"] |
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
--server | |
Total load time is about 16s: | |
rbconfig - 524ms | |
open-uri - 887ms (removable for default case) | |
fileutils - 316ms | |
java - 573ms | |
yaml - 548ms | |
logging library - 936ms (NOT loaded through gems) |
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
jruby irb: | |
>> " foo.bar".match(/(\s|[^\w]){2,}/).end(0) | |
=> 1 | |
mri irb: | |
>> " foo.bar".match(/(\s|[^\w]){2,}/) | |
=> nil |
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: | |
------ | |
re=<<RE | |
(?x)^ | |
(?= [ ]{,3}>. | |
| ([ ]{4}|\t)(?!$) | |
| [#]{1,6}\s*+ | |
| [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$ | |
) | |
RE |