Skip to content

Instantly share code, notes, and snippets.

View vinz243's full-sized avatar

vinz243 vinz243

  • France
View GitHub Profile
@vinz243
vinz243 / Middleware.js
Created December 24, 2016 17:23 — forked from darrenscerri/Middleware.js
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));
});
#!/bin/bash
COMMAND='puppet parser validate'
TEMPDIR=`mktemp -d`
echo "### Attempting to validate puppet files... ####"
# See https://www.kernel.org/pub/software/scm/git/docs/githooks.html#pre-receive
oldrev=$1
newrev=$2
@vinz243
vinz243 / README.md
Last active August 29, 2015 14:15 — forked from JoelBesada/README.md

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.