Skip to content

Instantly share code, notes, and snippets.

View maxired's full-sized avatar

Maxence Dalmais maxired

View GitHub Profile
@maxired
maxired / .jsfmtrc
Created October 6, 2015 15:44
jsfmtc file for standart eslint config
{
"indent": {
"value": " ",
},
"whiteSpace" : {
"value" : "",
"removeTrailing" : 0,
"before" : { "FunctionExpressionOpeningBrace":1} ,
"after" : { "FunctionReservedWord":1 , "FunctionName":1 }
}
ALL:
gcc -fPIC -shared -o sslhack.so sslhack.c -lc -ldl
@maxired
maxired / index.html
Last active August 29, 2015 14:26
Mouse gesture circle detection browser
<html>
<head>
<style>
canvas { border : 1px solid black;
height : 100%;
width: 100%;
box-sizing:border-box;
}
body { margin :0px;
@maxired
maxired / disconnectTest.js
Last active August 29, 2015 14:22
[pigato] test to show that W_DISCONNECT is not always sended by Worker
var zmq = require('zmq');
var MDP = require('../lib/mdp');
var PIGATO = require('../');
var chai = require('chai'),
assert = chai.assert;
var uuid = require('node-uuid');
@maxired
maxired / RadialBlurInGimp.md
Last active December 23, 2021 06:45
How to do a radial blur in Gimp

#How to do a radial blur in Gimp

Gimp as some function to do blur effects, but it is not clear how to do a radial blur : Blur part of an image, starting from a point, with a radius, and the effect beeing less and less strong the farer we are from the central point.

Here is a sample Radial Blur Sample.

Here is the solution :

  • start with an unblur image.
  • copy the layer
  • on the top layer apply a gaussian blur : "filter -> blur -> gaussian blur". Change parameters so that the image is blurry as you want. This settings would be the blurriest of your final image.
var worker = new Worker('my_task.js');
worker.onmessage = function(event) {
console.log("Worker said : " + event.data);
};
worker.postMessage('ali');
@maxired
maxired / gist:4512404
Created January 11, 2013 17:15
processing a video in haar.js in Node
var cv = require('opencv');
var Canvas = require('canvas'),
fs = require('fs'),
HAAR = require('./src/haar-detector');
var loaded=false;
var detector = require('./cascades/haarcascade_frontalface_alt').haarcascade_frontalface_alt;
var vid = new cv.VideoCapture(__dirname +"/../../120308.mp4")
var Image = Canvas.Image;
@maxired
maxired / cubeInspect.js
Created September 11, 2012 08:59 — forked from temsa/cubeInspect.js
How to get introspection of square's "cube" events values for avent type, that you can use in your queries. this is a modified version for working with patch 5e7f122d1fccc942efa76cb9be947df8e11d8e05 Use ObjectID timestamps instead of dedicated field
var isArray = function (v) {
return v && typeof v === 'object' && typeof v.length === 'number' && !(v.propertyIsEnumerable('length'));
}
var isDate = function (v) {
return v && typeof v === 'object' && v instanceof Date;
}
var isObjectId = function (v) {
return v && typeof v === 'object' && v instanceof ObjectId;
@maxired
maxired / Readme
Created May 22, 2012 09:35
A function used to split Mongo Document before an insertion
This Gist show a way to split an array of mongo docuement before inserting them if we thinks this array my be to big for be inserted.
the _insertData function is a private function which insert the data the data contained in options.data in the collection `collection` and then call the `callback`
@maxired
maxired / app.js
Created May 3, 2012 22:42
A Micro Javascript Page Server à la PHP
var express = require('express');
var util = require('util'),
spawn = require('child_process').spawn;
var app = express.createServer();
app.get('/', function(req, res){
res.send('<ul>'
+ '<li>Download <a href="/helloworld.js">Hello world</a>.</li>'
+ '</ul>');