Skip to content

Instantly share code, notes, and snippets.

View paulanunda's full-sized avatar

Paul Anunda paulanunda

View GitHub Profile

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:

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 whose fingerprint is DB11 6F1F 61FC 2C3B 62D9 BC49 C5E0 69A6 58F8 85B3

To claim this, I am signing this object:

# 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
# 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
require "json"
require "net/http"
class Client
class NotificationsResponse
attr_reader :error
def initialize(&block)
@error = false
@notifications = begin

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@paulanunda
paulanunda / migrate_postgresql_database.md
Created December 8, 2016 06:23 — forked from olivierlacan/migrate_postgresql_database.md
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

@paulanunda
paulanunda / The Technical Interview Cheat Sheet.md
Created October 9, 2016 15:47 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.