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
| function anagram(word) { | |
| var originalWord = wordObject(word); | |
| return { | |
| matches: function(wordArray) { | |
| if (typeof wordArray === 'string'){ | |
| wordArray = Array.prototype.slice.call(arguments); | |
| } | |
| var wordMatches = []; |
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
| #!/usr/bin/env ruby | |
| require 'aws-sdk' | |
| require 'pry' | |
| Pry.config.prompt = [proc { "AWS> " }, proc { "AWS| " }] | |
| AWS.pry |
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 'bundler' | |
| Bundler.require(:default) | |
| # Currency | |
| # | |
| # A transaction currency. | |
| # | |
| class Currency |
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
| // ==UserScript== | |
| // @name RubyDoc.info Github Source Links | |
| // @description Adds view source on github links to rubydoc.info | |
| // @author Jonathan Rochkind | |
| // @include http://*rubydoc.info/github/* | |
| // @version 1.0 | |
| // ==/UserScript== | |
| if (match = window.location.pathname.match(/^\/github\/([^\/]+\/[^/]+)\/([^/]+)/)) { | |
| var github_project = match[1]; |
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 Callbacks | |
| @@callbacks = {} | |
| def has_callback_hook(name) | |
| @@callbacks[name] = [] | |
| class_eval <<-CLASS | |
| def #{name}_add block | |
| @callbacks[#{name}] << block | |
| 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 'yard' | |
| YARD::Parser::SourceParser.parse_string <<-eof | |
| # ### HELPERS ### | |
| # Generates the base job definition hash | |
| # | |
| # @param [Hash] p The sanitized params sent by the user | |
| # @param [Symbol] verb The job verb (:get, :post, :delete, :put) |