Skip to content

Instantly share code, notes, and snippets.

View mackwic's full-sized avatar
💭
I may be slow to respond, sorry for that.

Thomas Wickham mackwic

💭
I may be slow to respond, sorry for that.
View GitHub Profile
void * funct(vect, arr)
{
if vect == empty_vect()
return arr;
val = head(vect);
vect = tail(vect);
return funct(vect, arr[val]);
}
@mackwic
mackwic / plop.txt
Created September 25, 2012 00:31
les acus sont faitgues
LES ACUs SONT FATIGUES ! [3x]
Y'A QU'UNE VERSION DU SUJET ! [2x]
NOUS ON AIME BIEN NOS ACUs
ILS VONT OUVRIR LE RENDU
ON ENCULE LA MOULINETE
ELLE REDUIT NOS NOTES EN MIETTES
DEADLINE
@mackwic
mackwic / ply_clike.py
Created November 5, 2012 08:54 — forked from swdunlop/ply_clike.py
Example use of Python and Ply to lexically analyze C files for identifiers.
#!/usr/bin/env python
LICENSE = '''
Copyright (C) 2010, Scott W. Dunlop <swdunlop at gmail.com>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
void moveRight(float step, float oldAngle) {
float diffAngle = abs(oldGravityAngle - world.getGravityAngle());
Vec2 velocity = new Vec2(getXVelocity() * cos(diffAngle), getYVelocity() * sin(diffAngle));
Vec2 gotoRight = new Vec2(step * world.getGravityForce() * horizontalSpeed, 0);
Vector.rotate2D(gotoRight, world.getGravityAngle());
applyImpulse(gotoRight.x, gotoRight.y);
@mackwic
mackwic / oUnitCore.diff
Created March 16, 2013 17:47
OUnit patch proposal for parallelism
--- old-ounit/src/oUnitCore.ml 2013-03-16 18:45:34.806295575 +0100
+++ new-ounit/src/oUnitCore.ml 2013-03-16 18:45:34.814295575 +0100
@@ -14,6 +14,11 @@
* Types and global states.
*)
+type runner_type =
+ | Sequential
+ | Threaded
+ | Processus
@mackwic
mackwic / mySolution.js
Last active December 19, 2015 03:09 — forked from joegaudet/gist:5888481
$scope.$watch(function () {
return SessionService.currentUser;
}, function (user) {
$scope.user = user;
}, true);
@mackwic
mackwic / example_controller.js
Last active December 25, 2015 02:28
A partial example of one of our controllers
var Sha1 = require('server_common').crypto;
var auth = require('server_common').auth;
module.exports = function(app, models, config) {
var photoController = function () {};
photoController.mountRoutes = function () {
var auth_f = auth.ensure_authenticated({ roles: 'doctor' });
app.get('/api/photo', auth_f, photoController.load);
thomas@ks397436 ~/voyages (git)-[master] % node app
PORT: undefined
ARGV: { _: [], '$0': 'node ./app' }
verbose: Using secret: 3759b0085d9a09e102d4ac809531fad9 in cookie parser
verbose: Using Express router...
verbose: Configuring express.static flat-file middleware...
verbose: Loading app Gruntfile...
verbose: Tracking new grunt child process...
verbose: Loading hook: request
verbose: Hook loaded successfully: request
set nocompatible | filetype indent plugin on | syn on
source ~/.vim/bootstrap.vim
let g:addons = [
\ 'github:sjl/vitality.vim', 'sensible', 'github:sjl/badwolf',
\ 'vim-airline', 'ctrlp', 'Syntastic', 'github:myusuf3/numbers.vim',
\ 'github:rking/ag.vim', 'delimitMate', 'endwise', 'WebAPI', 'Gist',
\ 'fugitive', 'github:spiiph/vim-space',
\ 'github:mtth/scratch.vim', 'surround', 'JSON',
@mackwic
mackwic / nao_fait_taire_caliban.md
Last active August 29, 2015 13:57
Nao_fait_taire_caliban.md

Nao fait taire Caliban !

1 octobre, 2012

Publié par calibanproject dans Actualités, Actualités robotique, L'Association, Planète Robot

Mes amis,

c’est à la fois choqué, et pas vraiment surpris, que je vous fait part de cette information ! Pour la première fois de son histoire, l’Association Caliban fait l’objet d’une censure et cette dernière ne vient pas moins que de la » haut-dela-de-tout-soupson » société Aldebaran-Robotics.