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 'rubygems' | |
| require 'sq' | |
| class CreateUsers < SQ::Schema 1.0 | |
| def up | |
| create_table :users do | |
| String :login | |
| String :password | |
| end | |
| 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
| require 'rubygems' | |
| require 'ar' | |
| class DBSchema < AR::Schema 1.0 | |
| def self.up | |
| create_table :users do |t| | |
| t.string :login | |
| t.string :password | |
| end | |
| 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
| require 'net/http' | |
| require 'rubygems' | |
| #I_KNOW_I_AM_USING_AN_OLD_AND_BUGGY_VERSION_OF_LIBXML2=true | |
| require 'nokogiri' | |
| # This class allow you to retrive "lorem ipsum" placeholder text from lipsum.com. | |
| # | |
| # == What is "lorem ipsum"? | |
| # |
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
| t = ["vert", "jaune", "rouge"] | |
| puts t.push( t.shift )[-1] | |
| # => "vert" | |
| puts t.push( t.shift )[-1] | |
| # => "jaune" | |
| puts t.push( t.shift )[-1] | |
| # => "rouge" | |
| puts t.push( t.shift )[-1] | |
| # => "vert" |
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
| // Usage : | |
| // | |
| // @import "BrowserWindow.j" | |
| // ... | |
| // [BrowserWindow show]; | |
| @import <AppKit/CPWindowController.j> | |
| @import <AppKit/CPWebView.j> | |
| @implementation BrowserWindow : CPWindowController |
NewerOlder