Skip to content

Instantly share code, notes, and snippets.

View paulanunda's full-sized avatar

Paul Anunda paulanunda

View GitHub Profile
# source: https://www.lewagon.com/blog/how-to-migrate-your-heroku-postgres-database-to-amazon-rds
# lib/tasks/db.rake
require "uri"
namespace :db do
desc "Dump AWS production DB and restore it locally."
task import_from_aws: [ :environment, :create ] do
c = Rails.configuration.database_configuration[Rails.env]
Bundler.with_clean_env do
# Add the 'help' target below to your makefile, and then
# add "## DESCRIPTIVE TEXT" after each target
.PHONY: help
help: ## Display help
@echo $(MAKEFILE_LIST)
@awk -F ':|##' '/^[^\t].+?:.*?##/ {printf \
"\033[36m%-30s\033[0m %s\n", $$1, $$NF }' $(MAKEFILE_LIST) | sort

Keybase proof

I hereby claim:

  • I am paulanunda on github.
  • I am paulanunda (https://keybase.io/paulanunda) on keybase.
  • I have a public key whose fingerprint is DB11 6F1F 61FC 2C3B 62D9 BC49 C5E0 69A6 58F8 85B3

To claim this, I am signing this object:

function removeEventListeners(element, listenerMap) {
Object.keys(listenerMap).forEach(function (name) {
var listeners = listenerMap[name];
listeners.forEach(function (object) {
element.removeEventListener(name, object.listener);
});
});
};
removeEventListeners(window, getEventListeners(window));

Keybase proof

I hereby claim:

  • I am paulanunda on github.
  • I am paulanunda (https://keybase.io/paulanunda) on keybase.
  • I have a public key ASCKb32tyEAEEe494VoLAihChaFKmUSVlWFG3U73C7WncQo

To claim this, I am signing this object: