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
[2011-12-19 22:23:01] ./configure --prefix="/Users/Caius/.rvm/usr" | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... config/install-sh -c -d | |
checking for gawk... no | |
checking for mawk... no | |
checking for nawk... no | |
checking for awk... awk | |
checking whether make sets $(MAKE)... no | |
checking for gcc... no |
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
# This function will break up words for us. | |
def break_words(stuff) | |
words = stuff.split(' ') | |
return words | |
end | |
# Sorts the words. | |
def sort_words(words) | |
words.sort() | |
#return sorted(words) |
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 laser_weapon_armory() | |
puts "You do a dive roll into the Weapon Armory, crouch and scan the room" | |
puts "for more Gothons that might be hiding. It's dead quiet, too quiet." | |
puts "You stand up and run to the far side of the room and find the" | |
puts "neutron bomb in its container. Ther's a keypad lock in the box" | |
puts "and you need the code to get the bomb ot. If you get the code" | |
puts "wrong 10 times then the lock closes forever and you can't" | |
puts "get the bomb. The code is 3 digits." | |
code = "%s%s%s" % [rand(9)+1, rand(9)+1, rand(9)+1] | |
print "[keypad]> " |
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
9:53:01 PM Animawish: what's the difference between ruby rc1, p0, and head? | |
10:01:27 PM deryl: rc is a release candidate, p0 is the official release (currently) and head is the development branch where running changes are made | |
10:03:37 PM Animawish: ok | |
10:03:54 PM Animawish: so I tried installing p0 using the terminal and rc using jewelrybox | |
10:04:02 PM Animawish: and I got this http://pastie.org/3044241 | |
10:04:28 PM deryl: and? | |
10:04:42 PM Animawish: and I don't know how to make it work | |
10:05:42 PM deryl: did you read the make log like it said? did you look at the errors and look how to fix them? how did you get to this stage from what you were asking in the ruby channels about how to do regex on your warez? | |
10:06:25 PM Animawish: I'm trying to update ruby so I can learn it | |
10:09:09 PM Animawish: I didn't realize that I needed to know how to program in order to learn how to program |
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 prompt() | |
print "-> " | |
end | |
class Medical | |
def bed() | |
puts "You awake to the sound of alarms and flames. You're lying on a bed 3 meters from a raging fire. What do you do?" |
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 String | |
def initial | |
self[0,1] #gets first character | |
end | |
def twoinitial | |
self[0,2] #gets first two characters | |
end | |
def secondy | |
self[1,1] | |
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
puts "Welcome to Super Tic-Tac-Toe. I wear shiny spandex." | |
#---opp CHOOSER | |
teamrand = rand(0..1) | |
if teamrand == 0 | |
team = 'x' | |
opp = 'o' | |
puts "You're x, you go first." | |
elsif teamrand == 1 | |
team = 'o' |
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 String | |
def findchar(n) | |
self[n,1] #gets nth character | |
end | |
end | |
example = ['banana', 'elephant', 'apple', 'friday', 'cocaine', 'damage'] | |
array = example | |
parray = Array.new |
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
filename = ARGV.first | |
text = '' | |
text = File::open(filename) | |
readit = text.read | |
contents = readit.downcase.split(/\n+/) |
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
# TO DO: fix difficulty | |
columns = Array.new | |
# rows inside columns ; (y, x) | |
def createmap(mcolumns) #sticks rows in columns | |
asdf = 0 | |
while asdf < $boardy | |
rows = Array.new($boardx) {'.'} | |
mcolumns.push(rows) | |
asdf += 1 |
OlderNewer