This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Comes from http://fettblog.eu/gulp-browserify-multiple-bundles/ | |
'use strict'; | |
var gulp = require('gulp'), | |
source = require('vinyl-source-stream'), | |
rename = require('gulp-rename'), | |
browserify = require('browserify'), | |
glob = require('node-glob'), | |
es = require('event-stream'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Upgrading Bash | |
* http://apple.stackexchange.com/a/24635 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
json = json.unpack('U*').map {|i| i < 128 ? i.chr : "\\u#{i.to_s(16).rjust(4, '0')}"}.join |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Here is how to create an option/argument with mixlab-cli that can be assigned multiple values | |
# Hash | |
option :env, | |
:description => "Environment variable to pass to Cucumber. Can be specified more than once to set multiple environment variables", | |
:short => '-n NAME=VALUE', | |
:long => '--env NAME=VALUE', | |
:proc => | |
lambda do |c| | |
@env ||= {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
require 'json' | |
require 'socket' | |
require 'time' | |
# Create a string containing 1 megabyte of data | |
output = 'A' * ((1 * 1024 * 1024) + 1) | |
sensu_events = 2.times.map do |i| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"checks": { | |
"check_cucumber_example": { | |
"handlers": ["default"], | |
"command": "check-cucumber.rb --name cucumber-example --handler cucumber --metric-handler metrics --metric-prefix example-metrics-prefix --command \"node_modules/.bin/cucumber-js -f json features/\" --working-dir /var/cucumber-example/", | |
"interval": 300, | |
"subscribers": [ "cucumber" ] | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '{ | |
"handlers": ["email"], | |
"name": "it_is_cornbread_time", | |
"output": "Yummy!", | |
"status": 2, | |
"source": "server.example.org" | |
}' | nc -w1 127.0.0.1 3030 | |
echo '{ | |
"type": "metric", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://www.lonelycoder.com/redmine/boards/14/topics/3368 | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:adamsutton/tvheadend | |
sudo apt-get install tvheadend |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Windows Mobile Device Center 6.1 | |
http://www.microsoft.com/en-gb/download/details.aspx?id=3182 | |
# Install Hspl4. select SPL 2.08.HSPL | |
http://forum.xda-developers.com/showpost.php?p=5279236&postcount=4 | |
# Install Google Device Driver. This allows Android to connect to the PC | |
# Open Device Manager, find the unknown device and update the driver by pointing it at | |
# the Google Android Drivers directory | |
http://forum.xda-developers.com/showpost.php?p=21071699&postcount=73 | |
# Install cLK. Select 400MB for System Partition and 5MB for Cache | |
http://forum.xda-developers.com/showthread.php?t=1402975 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# update apt's package list | |
sudo apt-get update | |
# install git | |
sudo apt-get install g++ curl libssl-dev apache2-utils | |
sudo apt-get install git-core | |
# install node | |
sudo apt-get install nodejs | |
# install the Node package manager (npm) for later use | |
sudo apt-get install npm | |
sudo npm install express |