Skip to content

Instantly share code, notes, and snippets.

@emillon
emillon / coffec
Created December 9, 2011 14:33
Coffee counter
#!/bin/bash
# comptage de café
#
# -> date de chaque + heure
# -> total de café + total euros
#
#
# utilisation :
# coffec -> ajout d'un café
@emillon
emillon / Makefile
Created December 15, 2011 16:06
Test for several MD5 implementations
.PHONY: all clean
CC=gcc
CFLAGS=-Wall -Wextra $(shell pkg-config --cflags glib-2.0)
LIBS=$(shell pkg-config --libs glib-2.0)
all: md5test
md5test: md5.o main.o
$(CC) $(CFLAGS) $(LIBS) -o $@ $+
// ==UserScript==
// @match http://*.wikipedia.org/wiki/*
// This was written by Etienne Millon <etienne.millon@gmail.com>
//
// Replace Jimmy Wales' "donate now" pics by kittens.
// ==/UserScript==
function replaceJimmy() {
var img = $("img[alt='Jimmy Wales']")[0];
var url = 'http://placekitten.com/'+img.width+'/'+img.height;
@emillon
emillon / ytrw.py
Created August 9, 2012 10:11
Random Walk on Youtube
#!/usr/bin/env python
import random
import sys
import urllib2
from bs4 import BeautifulSoup
def video_open(vid):
url = 'http://www.youtube.com' + vid
return urllib2.urlopen(url)
@emillon
emillon / jussieu.geojson
Created February 12, 2014 11:56
Où manger après le spectacle ?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@emillon
emillon / README.md
Last active August 29, 2015 14:02
Logos

Logos vectoriels pour:

  • APR
  • LIP6
  • UPMC
  • CNRS
Binary files ocaml-3.12.0/.DS_Store and ocaml-diff/.DS_Store differ
diff -urN ocaml-3.12.0/.depend ocaml-diff/.depend
--- ocaml-3.12.0/.depend 2010-07-23 17:30:37.000000000 +0200
+++ ocaml-diff/.depend 2012-03-14 14:42:30.000000000 +0100
@@ -291,12 +291,17 @@
bytecomp/bytepackager.cmi: typing/ident.cmi
bytecomp/bytesections.cmi:
bytecomp/cmo_format.cmi: bytecomp/lambda.cmi typing/ident.cmi
+bytecomp/covevent.cmi: typing/types.cmi parsing/location.cmi
+bytecomp/covutils.cmi: typing/typedtree.cmi typing/primitive.cmi \
@emillon
emillon / bitoduc.sh
Created December 8, 2015 09:59
bitoduc.fr CLI client
#!/bin/sh
url=bitoduc.fr/traductions.json
jq='[.["vrais mots"] + .["faux mots"] | .[] | {(.anglais): .francais}]|add|.[$mot]'
curl -s "$url" | jq "$jq" -r --arg mot "$1"
(* Step 1: 'a list -> bool everywhere. *)
(* Step 2: Wrap in a newtype: Finder of 'a list -> bool *)
(* Step 3: abstract in a module with this signature *)
module type LIST_FINDER = sig
type 'a t
val this_element : 'a -> 'a t
@emillon
emillon / ExampleCodemod.re
Created November 27, 2018 12:23
2018-11-26 Reason Language Server codemod example
open Parsetree;
open Codemod.Helpers;
let replaceErrors = (ctx, expr) =>
expr
->mapExpr((mapper, expr) => {
switch (expr.pexp_desc) {
| Pexp_construct({txt: Longident.Lident("Student")} as lid, Some({pexp_desc: Pexp_tuple([name, age])})) =>
let loc = Location.none