Skip to content

Instantly share code, notes, and snippets.

require 'riak'
require 'instrumentable'
require 'pp'
c = Riak::Client.new pb_port: 17017
class Riak::Client
include Instrumentable
instrument_method :get_object, 'get_object'
(in /Users/bryce/Documents/hive/vendor/grit)
Loaded suite -e
Started
.............
..............................................................................................................FFE...........
Finished in 1.550918 seconds.
1) Failure:
test_basic(TestRubyGitAlt)
[./test/test_rubygit_alt.rb:18:in `test_basic'
* When an object is corrupt in a pack, the object became unusable even
when the same object is available in a loose form, We now try harder to
fall back to these redundant objects when able. In particular, "git
repack -a -f" can be used to fix such a corruption as long as necessary
objects are available.
diff --git a/Bundles/Ragel.tmbundle/Syntaxes/Ruby Ragel.tmLanguage b/Bundles/Ragel.tmbundle/Syntaxes/Ruby Ragel.tmLanguage
new file mode 100644
index 0000000..b0ea381
--- /dev/null
+++ b/Bundles/Ragel.tmbundle/Syntaxes/Ruby Ragel.tmLanguage
@@ -0,0 +1,564 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
80480ac: 31 c0 xor %eax,%eax
80480ae: 50 push %eax
80480af: 68 2f 62 6d 6b push $0x6b6d622f
80480b4: 68 2f 74 6d 70 push $0x706d742f
80480b9: 89 e0 mov %esp,%eax
80480bb: bb ff ff 09 02 mov $0x209ffff,%ebx
80480c0: c1 eb 10 shr $0x10,%ebx
80480c3: 53 push %ebx
80480c4: 50 push %eax
80480c5: 50 push %eax
dispatch "+"
{
asm (
"xor %%rax, %%rax\n\t"
"call _stack_pop\n\t"
"push %%rax\n\t"
"xor %%rax, %%rax\n\t"
"call _stack_pop\n\t"
"pop %%rbx\n\t"
"add %%rax, %%rbx\n\t"
proc stock symbol {
set html [unescape_html_entities [wget http://finance.google.com/finance?q=$symbol]];
set cn [html [strip_html [lindex [regexp -all -inline {_companyName = '(.*?)'} $html] 1]]];
set curr [html [strip_html [lindex [regexp -all -inline {<span class="pr".*?>(.*?)<} $html] 1]]];
set chr [regexp -all -inline {<span class="ch[rg]".*?>(.*?)<} $html];
if {[lindex $chr 1] < 0} {set col red} else {set col green};
. "[bold]$curr[bold][color $col on white][html [strip_html [lindex $chr 1]]] [html [strip_html [lindex $chr 3]]][color] [color blue on white]$cn[color]"}
-DOINK DOINK- BRISCOE
motive is "Hello world!" #motive = "Hello World"
evidence is 100 #evidence = 100
give motive, evidence #return [motive, evidence]
-DOINK DOINK- CRAGEN
desk work #nop
BRISCOE give me motive, evidence #[motive, evidence] = briscoe()
case is motive, evidence #case = [motive, evidence]
MCCOY here is case #mccoy(case)
#!/usr/bin/env ruby
file = File.read(ARGV[0])
file.gsub!(' ','0')
mangled = file.split.join(' ')
coded = "draw {#{mangled}}"
puts coded