Skip to content

Instantly share code, notes, and snippets.

View andrefbsantos's full-sized avatar
🐢

André Filipe Santos andrefbsantos

🐢
View GitHub Profile
### Keybase proof
I hereby claim:
* I am andrefbsantos on github.
* I am andrefbsantos (https://keybase.io/andrefbsantos) on keybase.
* I have a public key ASBEiQWwURpQYxRAomW_BjyS6xWYSZckBR9Om8KpG8oFjwo
To claim this, I am signing this object:
@andrefbsantos
andrefbsantos / flatMap.js
Created January 31, 2018 14:27 — forked from samgiles/flatMap.js
Javascript flatMap implementation
// [B](f: (A) ⇒ [B]): [B] ; Although the types in the arrays aren't strict (:
Array.prototype.flatMap = function(lambda) {
return Array.prototype.concat.apply([], this.map(lambda));
};
@andrefbsantos
andrefbsantos / fresh-chrome-with-custom-tz.sh
Created January 9, 2018 17:46 — forked from prasadsilva/fresh-chrome-with-custom-tz.sh
Launch new instances of Google Chrome on OS X with isolated cache, cookies, user config and custom Timezone
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every
@andrefbsantos
andrefbsantos / Gulpfile.js
Created November 28, 2017 16:28 — forked from webdesserts/Gulpfile.js
Automatically reload your node.js app on file change with Gulp (https://github.com/wearefractal/gulp).
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise.
var gulp = require('gulp'),
spawn = require('child_process').spawn,
node;
/**
* $ gulp server
* description: launch the server. If there's a server already running, kill it.
#!/usr/bin/env bash
set -e
###
# Add the line below to your setup command in Project Settings
#
# wget https://gist.githubusercontent.com/mimimalizam/27959bbc653de3965bb40955f4bc43df/raw/pg-downgrade-semaphore.sh && bash pg-downgrade-semaphore.sh
#
# Note: reset your dependency cache in Project Settings > Admin, before running this script