Skip to content

Instantly share code, notes, and snippets.

View nathan-appere's full-sized avatar

Nathan Appere nathan-appere

View GitHub Profile
@nathan-appere
nathan-appere / clone-heroku-app
Created July 5, 2023 08:27 — forked from pcreux/clone-heroku-app
Script to clone a heroku app (including buildpacks, users, add-ons, environment variables, lab features)
#!/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'
@nathan-appere
nathan-appere / copy-checklist.js
Last active May 8, 2020 07:18 — forked from niallsmart/copy-checklist.js
Copy Trello checklist to clipboard
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"));
@nathan-appere
nathan-appere / sig.rb
Created October 1, 2019 15:18 — forked from havenwood/sig.rb
An example for Nathanael7 on #ruby IRC
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.