Skip to content

Instantly share code, notes, and snippets.

View adamreisnz's full-sized avatar
🚀
Building greatness

Adam Reis adamreisnz

🚀
Building greatness
View GitHub Profile
@adamreisnz
adamreisnz / release.sh
Last active April 13, 2024 17:01
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: ./release.sh 1.0.3
# Get version argument and verify
version=$1
if [ -z "$version" ]; then
echo "Please specify a version"
@adamreisnz
adamreisnz / package.json
Last active January 19, 2024 13:01
Simple pure npm scripts build process
{
"name": "project-name",
"description": "Template for static sites",
"version": "1.0.0",
"homepage": "http://www.project-name.com",
"author": {
"name": "Adam Reis",
"url": "http://adam.reis.nz"
},
"license": "UNLICENSED",
@adamreisnz
adamreisnz / Angular directives
Last active October 18, 2023 04:11
A collection of random useful Angular directives
Angular directives
@adamreisnz
adamreisnz / setup-osx-work-environment.md
Last active February 27, 2023 11:58
Setup Mac OS X work environment

Installing applications

Basic applications

Download and install the following applications:

@adamreisnz
adamreisnz / getTemporaryDirectory.js
Created June 19, 2015 22:18
Node module to get path to an empty temporary directory
/**
* Module dependencies
*/
var fs = require('fs');
var os = require('os');
var del = require('del');
/**
* Get an temporary directory with given name
@adamreisnz
adamreisnz / Terminal commands
Last active May 8, 2020 09:49
A bunch of useful terminal commands
Terminal commands
@adamreisnz
adamreisnz / duplicateRequestsFilter.js
Last active September 17, 2018 12:10
An AngularJS $http decorator to filter duplicate requests (now released as library: https://github.com/meanie/angular-duplicate-requests-filter)
/**
* Module definition and dependencies
*/
angular.module('Api.DuplicateRequestsFilter.Decorator', [])
/**
* Config
*/
.config(function($provide) {
@adamreisnz
adamreisnz / history.service.js
Created March 31, 2018 20:54
An Angular service to keep track of history, with API to toggle between next/previous items
/**
* Module definition and dependencies
*/
angular.module('Shared.History.Service', [])
/**
* Service definition
*/
.factory('History', function($storage) {
@adamreisnz
adamreisnz / eslintrc.browser.yaml
Last active December 1, 2017 07:15
ESLint configuration
root: true
extends: eslint:recommended
parserOptions:
ecmaVersion: 2017
ecmaFeatures:
impliedStrict: true
sourceType: module
env:
es6: true
browser: true
#! /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
#