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
test edit of my gist |
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
test |
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
require 'cgi' | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
cgi = CGI.new | |
print cgi.header('type' => 'text/xml') | |
doc = Hpricot(open('http://www.apple.com/retail/sanfrancisco/')) | |
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
Check out this website http://forgood.yahoo.com | |
Hack for Good | |
Any hack or mashup that could better the world and allow more social awareness | |
Examples: | |
How green is this website Hack | |
Custom Searchmonkey module for nonprofits |
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
in validations_i18n_test.rb: | |
def test_validates_length_of_counts_utf8_characters | |
Topic.validates_length_of :title, :is => 7 | |
@topic.title = 'El Niño' | |
@topic.errors.expects(:generate_message).never | |
@topic.errors.expects(:generate_message).never | |
@topic.valid? | |
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
saywatmang: hey lifo why arent transactional migrations supporetd in mysql | |
defunkt: you cant do ddl in transactions in mysql | |
abedra: cause mysql is a toy and no one should use it | |
defunkt: if mysql is a toy, what does that make ruby | |
lifo: toy box |
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 Hand | |
def straight? | |
values = @cards.map{|card| card.value}.uniq.sort | |
values.unshift 1 if values.include?(14) # ace can be low | |
0.upto(values.length - 5) do |i| | |
return true if values[i] + 4 == values[i + 4] | |
end | |
false | |
end | |
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
web design inspiration for bakineggs.com: | |
http://calendaraboutnothing.com/ | |
http://blog.evanweaver.com/ | |
http://cryingwhilecoding.com/ | |
http://www.sixshootermedia.com/ostemplates/clarity/ |
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
/* | |
* main.cpp - part of MP1 | |
* | |
* Rotates the file in.bmp 180 degrees and saves it to out.bmp | |
* | |
*/ | |
#include "EasyBMP.h" | |
using namespace std; | |
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
COMPILER = g++ | |
COMPILER_OPTS = -O0 -Wall -c -g | |
LINKER = g++ | |
LINKER_OPTS = -o | |
testscene: testscene.o scene.o image.o EasyBMP.o | |
$(LINKER) $(LINKER_OPTS) testscene testscene.o scene.o image.o EasyBMP.o | |
testimage: testimage.o image.o EasyBMP.o |
OlderNewer