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
#!/usr/bin/env ruby | |
# Copy a heroku app (buildpacks, add-ons, labs, config, users). | |
# This script is idempotent so it can run against an existing app. | |
# | |
# Usage: | |
# $> clone-heroku-app source-app target-app | |
require 'json' |
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
copy($(".checklist-item:not(.checklist-item-checked)").map(function() { | |
var $el = $(this), | |
item = $el.find(".checklist-item-details-text").text(); | |
if ($el.hasClass("checklist-item-state-complete")) { | |
item = "- [x] " + item; | |
} else { | |
item = "- [ ] " + item; | |
} | |
return item; | |
}).get().join("\n")); |
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
def sig(method_name) | |
meth = method(method_name) | |
parameters = meth.parameters.map do |type, name| | |
case type | |
when :req | |
name | |
when :rest | |
"*#{name}" | |
when :opt | |
# Unknown default argument. |