Skip to content

Instantly share code, notes, and snippets.

@Furzel
Furzel / customAssert.js
Created July 13, 2014 21:22
How to add a custom assertion to should.js
var should = require('should');
should.use(function (should, Assertion) {
Assertion.add('myEql', function (value, description) {
this.params = { operator: 'to be' + should.format(expectedTraces), message: description};
this.assert(value === this.obj);
});
});
#!/bin/bash
libudev='libudev.so.0'
binary=`./MyApp`
# remove old symlink if exist
if [ -a $libudev ]
then
rm $libudev
fi
# check wether libudev.so.0 can be found on the system
@Furzel
Furzel / hipchat.js
Created November 21, 2013 22:45
Quick message sender for hipchat API. There is two way to send a message : either create a new sender with new Sender() and call mySender.send() to fire messages or use sendMessage if you need to send only one message with this configuration.
var hipchat = require('hipchat-js')("*** API TOKEN HERE ****");
exports.Sender = function(roomId, senderName, messageFormat, notify) {
this.roomId = roomId;
this.senderName = senderName;
this.notify = notify;
this.messageFormat = messageFormat;
this.send = function(message, color) {
if (!color)