Skip to content

Instantly share code, notes, and snippets.

View mauricesvay's full-sized avatar
💭
🍗

Maurice Svay mauricesvay

💭
🍗
View GitHub Profile
@mauricesvay
mauricesvay / composer.json
Created April 26, 2016 09:05
Sketchfab RSS Feed for Staff Picks
{
"require": {
"suin/php-rss-writer": "^1.3",
"erusev/parsedown": "^1.6"
}
}
#!/bin/bash
# update hooks; note that this hook will still execute its current version and not
# the updated one
#git pull --rebase &>/dev/null
branch_name=$( git rev-parse --abbrev-ref HEAD )
is_special_branch=$( echo "${branch_name}" | grep -i "^\(hotfix\|develop\|master\|HEAD\)" )
if [ ! "${is_special_branch}" ]
@mauricesvay
mauricesvay / detector.js
Created January 9, 2014 10:23
Original js implementation of face detection
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
@mauricesvay
mauricesvay / jobboards.md
Last active December 24, 2015 16:19
Job boards spécialisés dans les nouvelles technologie en France
#!/usr/local/bin/node
var http = require('http');
var exec = require('child_process').exec;
var url = 'http://api.citybik.es/velib.json';
// var lat = '48.8836694';
// var lon = '2.3736453';
var id = 19030;
command = '/home/pi/blink1-tool -m 100 --rgb 50,50,50';
@mauricesvay
mauricesvay / betasub.js
Last active December 12, 2015 02:09
Automatically unzip compressed subtitles
var exec = require('child_process').exec;
var http = require("http");
var fs = require('fs');
var APIKEY = 'c8c4da831d5c';
function showScrape(filename, callback) {
var url = "http://api.betaseries.com/shows/scraper.json?key=" + APIKEY + "&file=";
url = url + encodeURIComponent(filename);
http.get(url, function(res) {
@mauricesvay
mauricesvay / gist:4408150
Created December 29, 2012 17:19
Parse iwlist scan output in JavaScript (nodejs)
function iwlistParse(str) {
var out = str.replace(/^\s+/mg, '');
out = out.split('\n');
var cells = [];
var line;
var info = {};
var fields = {
'mac' : /^Cell \d+ - Address: (.*)/,
'ssid' : /^ESSID:"(.*)"/,
'protocol' : /^Protocol:(.*)/,