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
module PredicateMethods | |
module Firewalls | |
class Allow | |
def initialize(what) | |
@wrappee = what | |
end | |
def method_missing(name, *args, &blk) | |
begin |
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 'continuation' | |
class FactorialsInCC | |
def fact(n) | |
factorial = 1 | |
callcc { |fact_jmp| @fact_jmp = fact_jmp } | |
factorial *= n | |
n -= 1 |
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
# | |
# The simplest of makefiles. | |
# | |
# Perhapse after some refactoring this will be more complex, but for now | |
# it is sweet and simple. | |
# | |
# SD 2005-10-23 | |
# | |
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 Object | |
def in? *others | |
[others].flatten.include? self | |
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
class Spec::Example::ExampleGroup | |
def execute(*args, &block) | |
DB.transaction do | |
begin | |
super(*args, &block); | |
ensure | |
raise Sequel::Error::Rollback | |
end | |
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
[__main__] | |
ignore.default = \A#.*\Z | |
\A.*~\Z | |
\A.*\.py[oc]\Z | |
\A.*\.sw[nopx]\Z | |
\A.*\.swpx\Z | |
\A\..*\.tmp\Z | |
\A\.~lock\..*#\Z | |
\A.*\Session.sublime_session\Z |
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
select 'alter table ' || source_table || ' add constraint ' || constraint_name || ' foreign key (' || con_columns || ') references ' || target_table || ' (' || ind_columns || ') enable' data | |
from (select constraint_name, source_table, target_index, target_table, con_columns, wm_concat(column_name) ind_columns | |
from (select a.constraint_name, a.source_table, a.target_index, b.table_name target_table, a.con_columns, b.column_name, b.column_position | |
from (select a.constraint_name, a.source_table, a.target_index, wm_concat(a.column_name) con_columns | |
from (select a.constraint_name, | |
a.table_name source_table, | |
a.r_constraint_name target_index, | |
b.column_name, | |
b.position | |
from user_constraints a |
NewerOlder