Skip to content

Instantly share code, notes, and snippets.

View lsegal's full-sized avatar

Loren Segal lsegal

View GitHub Profile
@lsegal
lsegal / anagram.js
Last active December 28, 2017 23:46 — forked from stevepm/anagram.js
function anagram(word) {
var originalWord = wordObject(word);
return {
matches: function(wordArray) {
if (typeof wordArray === 'string'){
wordArray = Array.prototype.slice.call(arguments);
}
var wordMatches = [];
@lsegal
lsegal / aws-repl.rb
Last active December 6, 2018 16:59 — forked from mdub/aws-repl.rb
#!/usr/bin/env ruby
require 'aws-sdk'
require 'pry'
Pry.config.prompt = [proc { "AWS> " }, proc { "AWS| " }]
AWS.pry
require 'bundler'
Bundler.require(:default)
# Currency
#
# A transaction currency.
#
class Currency
@lsegal
lsegal / rubydoc_github_source_links.user.js
Created October 22, 2011 02:09 — forked from jrochkind/gist:1305162
add links to github from rubydoc.info docs in the 'github' area.
module Callbacks
@@callbacks = {}
def has_callback_hook(name)
@@callbacks[name] = []
class_eval <<-CLASS
def #{name}_add block
@callbacks[#{name}] << block
end
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)