Skip to content

Instantly share code, notes, and snippets.

Adam Reis adamreisnz

Block or report user

Report or block adamreisnz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
adamreisnz / history.service.js
Created Mar 31, 2018
An Angular service to keep track of history, with API to toggle between next/previous items
View history.service.js
* Module definition and dependencies
angular.module('Shared.History.Service', [])
* Service definition
.factory('History', function($storage) {
#! /bin/sh
# skeleton example file to build /etc/init.d/ scripts.
# This file should be used to construct scripts for /etc/init.d.
# Written by Miquel van Smoorenburg .
# Modified for Debian
# by Ian Murdock .
# Further changes by Javier Fernandez-Sanguino

Keybase proof

I hereby claim:

  • I am adamreisnz on github.
  • I am adamreisnz ( on keybase.
  • I have a public key whose fingerprint is 5C16 2312 D6A7 C9D7 E960 3CC9 5C21 BFA8 0BBB D694

To claim this, I am signing this object:

adamreisnz /
Last active Nov 15, 2019
A script to automate merging of release branches
#!/usr/bin/env bash
# Assuming you have a master and dev branch, and that you make new
# release branches named as the version they correspond to, e.g. 1.0.3
# Usage: ./ 1.0.3
# Get version argument and verify
if [ -z "$version" ]; then
echo "Please specify a version"
adamreisnz / package.json
Last active Nov 6, 2019
Simple pure npm scripts build process
View package.json
"name": "project-name",
"description": "Template for static sites",
"version": "1.0.0",
"homepage": "",
"author": {
"name": "Adam Reis",
"url": ""
"license": "UNLICENSED",
View eslintrc.browser.yaml
root: true
extends: eslint:recommended
ecmaVersion: 2017
impliedStrict: true
sourceType: module
es6: true
browser: true
adamreisnz / waterfall.js
Created Feb 15, 2016
Run an array of promises in series, failing when one of them fails and not running the rest
View waterfall.js
'use strict';
module.exports = function waterfall(promises) {
return promises.reduce((previousPromise, promise) => {
return previousPromise.then(() => {
return promise();
}, Promise.resolve());
adamreisnz /
Last active Aug 8, 2019
Setup Mac OS X work environment

Installing applications

Basic applications

Download and install the following applications:

adamreisnz / duplicateRequestsFilter.js
Last active Sep 17, 2018
An AngularJS $http decorator to filter duplicate requests (now released as library:
View duplicateRequestsFilter.js
* Module definition and dependencies
angular.module('Api.DuplicateRequestsFilter.Decorator', [])
* Config
.config(function($provide) {
adamreisnz / Angular directives
Last active Dec 29, 2018
A collection of random useful Angular directives
View Angular directives
Angular directives
You can’t perform that action at this time.