Skip to content

Instantly share code, notes, and snippets.

@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active March 16, 2026 18:17
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@darrenscerri
darrenscerri / Middleware.js
Last active July 11, 2023 02:59
A very minimal Javascript (ES5 & ES6) Middleware Pattern Implementation
var Middleware = function() {};
Middleware.prototype.use = function(fn) {
var self = this;
this.go = (function(stack) {
return function(next) {
stack.call(self, function() {
fn.call(self, next.bind(self));
});
@unbug
unbug / Middleware.js
Last active January 6, 2024 04:17
Powerful Javascript Middleware Pattern Implementation, apply middleweares to any object. https://unbug.github.io/js-middleware/
'use strict';
/* eslint-disable consistent-this */
let middlewareManagerHash = [];
/**
* Composes single-argument functions from right to left. The rightmost
* function can take multiple arguments as it provides the signature for
* the resulting composite function.
*
@nasthu
nasthu / awssh.sh
Last active September 17, 2018 09:45 — forked from henrikenblom/awssh.sh
Connect to running AWS instances using tag names
#!/bin/bash
####################################################
# Connect to running AWS instances using tag names #
# Author: henrik.enblom@uniqode.se #
####################################################
PEM_FILE="$HOME/.ssh/aws.pem";
DEFAULT_USERNAME="ubuntu";