This file contains hidden or 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
item_for_spell = { | |
1611 => "lightning bolt-shaped blued steel rod", | |
613 => "long wooden stake", | |
913 => "small polychromatic trinket", | |
1204 => "petrified thanot wand", | |
1208 => "petrified thanot wand", | |
1220 => "petrified thanot wand", | |
} | |
get_xday_from_magicsack = proc do |
This file contains hidden or 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 'ostruct' | |
class Bounty | |
class Parser | |
@@task_assignment_regexs = { | |
/It appears they have a creature problem they'd like you to solve/ => :cull, | |
/It appears they need your help in tracking down some kind of lost heirloom/ => :heirloom, | |
/The local furrier .+ has an order to fill and wants our help/ => :skins, | |
/The local gem dealer, [^,]+, has an order to fill and wants our help/ => :gem, | |
# /to provide a protective escort/ => :escort, |
This file contains hidden or 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
load 'bounty_parser.lic' | |
class Bounty | |
describe Parser, "#parse" do | |
it "can tell when we don't have a task" do | |
bounty = described_class.parse "You are not currently assigned a task." | |
bounty[:task].should == :taskmaster | |
bounty[:requirements].should be_nil | |
bounty[:status].should be_nil | |
end |
This file contains hidden or 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
On an armor stand: | |
1 a rolaren augmented breastplate | |
2 some rolaren brigandine armor | |
3 a polished rolaren aegis | |
4 a rolaren greathelm | |
5 a rolaren chain hauberk | |
6 an ornate rolaren helm | |
On a weapon rack: | |
7 a gold-tipped rolaren broadsword |
This file contains hidden or 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 'ostruct' | |
class Bounty | |
class Parser | |
@@task_assignment_regexs = { | |
/It appears they have a creature problem they'd like you to solve/ => :cull, | |
/It appears they need your help in tracking down some kind of lost heirloom/ => :heirloom, | |
/The local furrier .+ has an order to fill and wants our help/ => :skins, | |
/The local gem dealer, [^,]+, has an order to fill and wants our help/ => :gem, | |
# /to provide a protective escort/ => :escort, |
This file contains hidden or 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 'ostruct' | |
def variable | |
["running_in_spec"] | |
end | |
def echo(*args) | |
puts *args if debug | |
end |
This file contains hidden or 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
> http GET garage/doors | |
HTTP/1.1 200 OK | |
Connection: Keep-Alive | |
Content-Length: 63 | |
Content-Type: application/json | |
Date: Sat, 02 May 2015 16:53:47 GMT | |
Server: WEBrick/1.3.1 (Ruby/1.9.3/2012-04-20) | |
X-Content-Type-Options: nosniff | |
{ |
This file contains hidden or 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
# Mount image desintion to /home/partimag as desired | |
# No wizards from here. Use the Clonezilla command line | |
# Abort script on any failures, print out commands for debugging | |
set -e | |
set -x | |
# Partition to clone | |
[ -n "$VG_NAME" ] || VG_NAME="systemvg" | |
[ -n "$LV_NAME" ] || LV_NAME="rootlv" |
This file contains hidden or 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
~/tmp/rc cat c.rb | |
#!/usr/bin/ruby | |
puts 4 | |
-5 | |
~/tmp/rc ./c.rb | |
4 |
This file contains hidden or 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 "bunny" | |
# Start a communication session with RabbitMQ | |
conn = Bunny.new | |
conn.start | |
# open a channel | |
ch = conn.create_channel | |
# declare a queue |