Skip to content

Instantly share code, notes, and snippets.

View mytrile's full-sized avatar

Dimitar Kostov mytrile

View GitHub Profile
def what_is_this
puts 'Maybe Github Patie ?'
end
class Question < ActiveRecord::Base
has_one :answer
has_many :suggestions
def s_attributes=(s_attributes)
s_attributes.each do |attr|
suggestions.build(attr)
end
end
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.bg/">here</A>.
</BODY></HTML>
@mytrile
mytrile / links.rb
Created September 8, 2008 11:32
Get all links from website using Hpricot
defaults write -g AppleUseCoreUI -bool NO
defaults write NSGlobalDomain NSUseLeopardWindowValues NO
count = 1
print 'Maximum: '
input = gets.to_i
rand = rand(input)
print "Guess :"
guess = gets.to_i
while (guess!=rand)
if guess > rand
puts "High Sky Try !"
else