Skip to content

Instantly share code, notes, and snippets.

View xseignard's full-sized avatar
🦄
Internet thuggin'

Xavier Seignard xseignard

🦄
Internet thuggin'
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xseignard
xseignard / karma.config.js
Created December 6, 2015 16:40
karma config for react+webpack+mocha
import webpack from 'karma-webpack';
module.exports = function (config) {
config.set({
frameworks: [ 'mocha', 'chai' ],
files: [
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
'test/**/*.test.jsx'
],
plugins: [ webpack, 'karma-mocha', 'karma-chai', 'karma-phantomjs-launcher', 'karma-spec-reporter'],
#!/bin/bash
echo "dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait" > /boot/cmdline.txt
systemctl disable [email protected]
var chai = require('chai'),
should = chai.should(),
sinon = require('sinon'),
sinonChai = require('sinon-chai'),
proc = require('child_process'),
shutdown = require('../../src/tools/shutdown.js');
chai.use(sinonChai);
describe('shutdown()', function(){
[
{
"waypoints": [
{
"sensorId": "1",
"date": "2015-11-20T15:01:53.705Z"
},
{
"sensorId": "1",
"date": "2015-11-20T15:08:14.990Z"
[
{
"_id": "564f35e1faf345b14bc664d2",
"sensorId": "1",
"visitId": "9e4dca40-8f97-11e5-9340-a3d282c49aba",
"date": "2015-11-20T15:01:53.705Z",
"__v": 0
},
{
"_id": "564f375efaf345b14bc664d3",
'use strict';
var serialport = require('serialport'),
SerialPort = serialport.SerialPort,
crc = require('crc');
var sp = new SerialPort('/dev/ttyUSB0', {
baudrate: 38400,
parser: serialport.parsers.readline('#')
});
@xseignard
xseignard / package.json
Last active November 15, 2015 23:56
Mocha, Istanbul and Codeclimate FTW
{
"scripts": {
"test": "mocha -R spec test/**/*.test.js",
"lint": "jshint src test demo",
"coverage": "istanbul cover --dir ./reports _mocha -- -R spec test/**/*.test.js",
"codeclimate": "CODECLIMATE_REPO_TOKEN=MY_TOKEN codeclimate-test-reporter < reports/lcov.info",
"clean": "rimraf reports",
"ci": "npm run clean && npm run lint && npm run test && npm run coverage && npm run codeclimate"
},
"devDependencies": {
#include <MIDI.h>
// number of phones
const int NUMBER_OF_PHONES = 4;
// input pins for dial
const int DIAL_IN[NUMBER_OF_PHONES] = {A4,A1,9,12};
// input pin for end of dial
const int END_DIAL[NUMBER_OF_PHONES] = {A5,A2,8,11};
// input pin for phone handling
const int PHONE_HANDLE[NUMBER_OF_PHONES] = {A3,A0,10,13};