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
// NodeJS BUG: | |
// | |
// HTTP mode always calls log message on L30. | |
// HTTP has not yet failed. | |
// | |
// HTTPS mode never calls the log message on L30. | |
// HTTPS mode randomly throws the following exception: | |
// node.js:134 | |
// throw e; // process.nextTick error, or 'error' event on first tick | |
// ^ |
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 Extensions | |
module Models | |
module Serialization | |
def as_json(options={}) | |
return super(options) if options.nil? # do not compromise CouchDB's version of the doc. | |
with_serialization_defaults(options) do |options| | |
jzon = super(options) | |
if options && options[:methods] | |
options[:methods].each { |method| jzon[method] = send(method) if respond_to?(method) } |
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
<!doctype html> | |
<html> | |
<body> | |
<div class="ribbon"> | |
<a href="#" rel="me">Fork me on GitHub</a> | |
</div> | |
</body> | |
</html> |
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
/Users/derek/.rvm/gems/ree-1.8.7-2010.02@nitro/gems/activesupport-3.0.0.beta4/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `name_for_action' for nil:NilClass (NoMethodError) | |
from /Users/derek/.rvm/gems/ree-1.8.7-2010.02@nitro/gems/actionpack-3.0.0.beta4/lib/action_dispatch/routing/mapper.rb:710:in `match' | |
from /Users/derek/.rvm/gems/ree-1.8.7-2010.02@nitro/gems/actionpack-3.0.0.beta4/lib/action_dispatch/routing/mapper.rb:287:in `map_method' | |
from /Users/derek/.rvm/gems/ree-1.8.7-2010.02@nitro/gems/actionpack-3.0.0.beta4/lib/action_dispatch/routing/mapper.rb:243:in `post' | |
from /Users/derek/.rvm/gems/ree-1.8.7-2010.02@nitro/bundler/gems/devise-8504d58f0336e724a0c4731303a4b03858b68c88-master/lib/devise/rails/routes.rb:188:in `devise_session' | |
from /Users/derek/.rvm/gems/ree-1.8.7-2010.02@nitro/gems/actionpack-3.0.0.beta4/lib/action_dispatch/routing/mapper.rb:329:in `scope' | |
from /Users/derek/.rvm/gems/ree-1.8.7-2010.02@nitro/bundler/gems/devise-8504d58f0336e724a0c4731303a4b03858b68 |
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
#my-div { | |
-moz-box-shadow: white 0px 1px 0px 5px; | |
-webkit-box-shadow: white 0px 1px 0px 5px; | |
-o-box-shadow: white 0px 1px 0px 5px; | |
box-shadow: white 0px 1px 0px 5px; | |
} |
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
<%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.all, {}, {:disabled => true} %> |
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
// adapted from the good folks at www.particletree.com | |
// Rediscovering the Button Element by Kevin Hale | |
// http://particletree.com/features/rediscovering-the-button-element/ | |
// Converted to SASS by Derek Perez (derek@derekperez.com) | |
=base-button | |
margin: 0px | |
background-color: #f5f5f5 | |
border: 1px solid #dedede | |
border-top: 1px solid #eee |
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
.form-element | |
input, textarea | |
:border 1px solid gray | |
:padding 5px | |
input.example-field | |
:color #e0e0e0 | |
:font-style italic | |
:padding 5px | |
textarea |
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 Hash | |
def method_missing(meth,*args) | |
self[meth].is_a?(Proc) ? self[meth].call(args) : self[meth] | |
end | |
end | |
class Object | |
def function(*args, &block) | |
lambda { |meth_args| yield(Hash[*args.zip(meth_args).flatten]) } | |
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 Hash | |
def method_missing(meth,*args) | |
self[meth].is_a?(Proc) ? self[meth].call(*args) : self[meth] | |
end | |
end | |
MyClass = { | |
:some_method => lambda { |arg| | |
puts "#{arg} was recieved" |