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
$('li.field') | |
.bind('drop.sortable', function(){}) | |
.bind('drop.add_field', function(){}); |
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
~/enn/site(git:master) | |
: merb -i | |
~ Connecting to database... | |
~ Loaded slice 'MerbAuthSlicePassword' ... | |
~ Activating slice 'MerbAuthSlicePassword' ... | |
>> User.first | |
=> #<User id=1 login="wizard" crypted_password=... salt=...> |
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
class DataMapper::Validate::ValidationErrors | |
def to_h | |
@errors || {} | |
end | |
def merge some_errors | |
to_h.merge! some_errors.to_h | |
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
=heading(!height, !src) | |
:height= !height | |
:background | |
:image= url(/images/headers/!src) | |
:repeat no-repeat | |
h1, h2, h3, h4, h5, h6, span, p | |
:visibility hidden | |
#header | |
+container |
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
module PressMember | |
TableName = 'press_member' | |
class DataMapper_ | |
include DataMapper::Resource | |
storage_names[:default] = TableName | |
property :id, Serial | |
property :name | |
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 'irb/completion' | |
require 'irb/ext/save-history' | |
require 'pp' | |
require 'pathname' | |
__DIR__ = Pathname.new(__FILE__).dirname.expand_path | |
eval (__DIR__+".irbrc").read if (__DIR__+".irbrc").exist? | |
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
Switch to the OpenOffice.org directory and move away the python runtime coming with OOo. | |
cd /path/to/openoffice.org/program | |
mv libpython.so.2 libpython.so.2.orig | |
mv python-core python-core.orig | |
cp pythonloader.unorc pythonloader.unorc.orig | |
ln -s /usr/local/lib/libpython2.3.so.1.0 libpython.so.2 |
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
# Working through some ideas from the subtext language project | |
# http://www.subtextual.org/ | |
# http://alarmingdevelopment.org/?p=160 <= Subtext Source | |
require 'rubygems' | |
require 'extlib' | |
class Node | |
attr_accessor :input, :parent, :children, :assertion, :root, :table | |
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
<div id="player"> | |
<canvas id="levels" width="145" height="24"></canvas> | |
</div> |
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 'benchmark' | |
require 'fileutils' | |
require 'moneta' | |
require 'moneta/rufus' | |
require 'dm-core' | |
FileUtils.rm_f 'benchmark.tch' | |
cabinet = Moneta::Rufus.new(:file => 'benchmark') | |