View another-html.html
<pre class="highlight ruby">
<p>def convert_relation(invited_gender, relation)<br>
case invited_gender<br>
when &quot;male&quot;<br>
case relation<br>
when &quot;daughter&quot;, &quot;son&quot; then &quot;dad&quot;<br>
when &quot;mom&quot;, &quot;dad&quot; then &quot;son&quot;<br>
when &quot;grandfather&quot;, &quot;grandmother&quot; then &quot;grandson&quot;<br>
when &quot;sister&quot;, &quot;brother&quot; then &quot;brother&quot;<br>
when &quot;wife&quot; then &quot;husband&quot;<br>
View finding-deleted-associated-records-by-inverse-using-where-not.rb
# The main issue here is, if you do a bunch of delete calls on a model that has associations there will be some other records that
# still exist and point to legit looking values that don't work, because even though the foreign_key exists in the table,
# the record it is pointing to does not.
# For e.g. A User and an Event
# == Schema Information
#
# Table name: users
#
View create_videos.rb
class CreateVideos < ActiveRecord::Migration
def change
create_table :videos do |t|
t.string :video
t.text :meta_info
t.timestamps
end
end
end
View index.css
#border {
border: 1px solid red;
height: 200px;
width: 100%;
}
textarea {
height: 100%;
width: 100%;
border: 0px;
}
View gh-error.txt
The page build failed with the following error:
The submodule `octopress` was not properly initialized with a `.gitmodules` file.
For information on troubleshooting Jekyll see:
https://help.github.com/articles/using-jekyll-with-pages#troubleshooting
View README.md
View ruby_warrior_level_4.rb
class Player
def play_turn(warrior)
if warrior.feel.empty? && !taking_damage?(warrior) && warrior.health < 20
warrior.rest!
elsif warrior.feel.empty?
warrior.walk!
else
warrior.attack!
end
@health = warrior.health
View ruby_warrior_lvl_5.rb
class Player
def play_turn(warrior)
if @health.nil?
@health = warrior.health
end
if warrior.feel.empty? && !taking_damage?(warrior) && warrior.health < 20
warrior.rest!
elsif warrior.feel.captive?
warrior.rescue!
View Contract Killer 3.md

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

View posterous_import.rb
#!/usr/bin/env ruby
# This quick and dirty script imports posts and images exported by the
# Posterous backup feature into Octopress. Requires the escape_utils and
# nokogiri gems. Doesn't import comments.
#
# Videos and images are copied into a post-specific image directory used
# by my customized Octopress setup. Encoded videos are downloaded from
# Posterous. Images will probably need to be compressed/optimized afterward.
#
# Links to other posts in the same import will try to be converted. You will