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
# For the queasy, this is MIT licensed. See comment at the end. | |
module MySQLEncryption | |
# Mimics MySQL's AES_ENCRYPT() and AES_DECRYPT() encryption functions | |
def mysql_encrypt(s, key) | |
encrypt(s, mysql_key(key)) | |
end | |
def mysql_decrypt(s, key) |
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 'builder' | |
require 'PresentationCore' | |
require 'PresentationFramework' | |
require 'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeytoken=b77a5c561934e089' | |
module XamlTools | |
include System::Windows | |
StringReader = System::IO::StringReader; | |
XamlReader = System::Windows::Markup::XamlReader |
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 'xamltools.rb' | |
class MyCommand | |
include System::Windows::Input::ICommand | |
def add_CanExecuteChanged(h) | |
@change_handlers << h | |
end | |
def remove_CanExecuteChanged(h) | |
@change_handlers.remove(h) | |
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
describe "Widget#foo" do | |
it "does something" do | |
# This should be the functionality specs specific to the semantics of the method | |
Widget.new.foo.should == "do something" | |
end | |
end | |
# This captures the "type signature" of the method. Here are recipes for corner cases that you might forget. | |
# Note that the examples are not self-consistent by design. Only some of them might apply to any given method. | |
# However, the goal below is to include the union of all possible examples so that you can cut and paste |
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 'active_record/connection_adapters/abstract_adapter' | |
require 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' | |
require 'System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' | |
module System | |
class DBNull | |
def nil? | |
true | |
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
describe "Widget#foo" do | |
it "does something" do | |
# This should be the functionality specs specific to the semantics of the method | |
Widget.new.foo.should == "do something" | |
end | |
end | |
# This captures the "type signature" of the method. Here are recipes for corner cases that you might forget. | |
# Note that the examples are not self-consistent by design. Only some of them might apply to any given method. | |
# However, the goal below is to include the union of all possible examples so that you can cut and paste |