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
| Array.prototype.to_hash = function(id){ | |
| id = typeof(id) != 'undefined' ? id : "id"; | |
| var self = this; | |
| var out = {}; | |
| $.each(this, function(index, element){ | |
| out[element[id]] = element; | |
| }); | |
| return out; | |
| }; |
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 Modifier < Ohm::Model | |
| include Ohm::Typecast | |
| attribute :name, String | |
| attribute :multiplier, Float | |
| 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
| package ErrorLog; | |
| use vars qw/@ISA @EXPORT $AUTOLOAD/; | |
| our $App = shift || "empty"; | |
| use Exporter; | |
| #export methods. can add more, they will be catch'd by AUTOLOAD | |
| @EXPORT = qw /die warn notify/; | |
| @ISA = 'Exporter'; |
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 States | |
| extend ActiveSupport::Concern | |
| included do | |
| state_machine :status, :initial => :new do | |
| event :confirm do | |
| transition :new => :confirmed #, :if => lambda {|order| order.email.present?} | |
| 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
| # >-----------------------------[ Run 'Bundle Install' ]-------------------------------< | |
| say_wizard "Installing gems. This will take a while." | |
| if prefs.has_key? :bundle_path | |
| run "bundle install --without production --path #{prefs[:bundle_path]} --standalone" | |
| else | |
| run 'bundle install --without production --standalone' | |
| end | |
| # >-----------------------------[ Run 'After Bundler' Callbacks ]-------------------------------< |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>La llama que llama</title> | |
| </head> | |
| <body> | |
| <h1>La llama que habla</h1> | |
| <p> | |
| <img title="OLA K ASE" src="http://www.oyemexico.com/wp-content/uploads/2012/12/TUku4-380x285.jpg" alt="Una Llama que habla" /> | |
| </p> |
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
| <?php | |
| if ( has_post_thumbnail( $post_id ) ) { | |
| // check if to show lightbox desc and title | |
| if ( get_option_max( 'pretty_title_show' ) == 'true' ){ | |
| $title = ' title="' . get_the_excerpt() . '"'; | |
| } | |
| $cat_list = array(); |
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
| { | |
| "method": "POST", | |
| "source": null, | |
| "params": { | |
| "id": "1392", | |
| "form_id": "52", | |
| "date_created": "2013-05-29 16:38:53", | |
| "is_starred": "0", | |
| "is_read": "0", | |
| "ip": "190.192.7.129", |
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 Poxy | |
| class RequestFactory | |
| def initialize(target, rack_request) | |
| @rp = Poxy::RequestProcessor.new(rack_request) | |
| method, headers, query_string, params, body = @rp.parsed | |
| url = fix_url(target, query_string) | |
| headers = fix_headers(headers) | |
| HTTPI.adapter = :curb | |
| @request = HTTPI::Request.new( |
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 Bucket < Ohm::Model | |
| attribute :name | |
| attribute :token | |
| list :unread, :Request | |
| end |