Skip to content

Instantly share code, notes, and snippets.

View Ricordel's full-sized avatar

Yoann Ricordel Ricordel

View GitHub Profile
@Ricordel
Ricordel / ctype_async_raise.py
Created April 3, 2017 15:16 — forked from liuw/ctype_async_raise.py
Nasty hack to raise exception for other threads
#!/usr/bin/env python
# liuw
# Nasty hack to raise exception for other threads
import ctypes # Calm down, this has become standard library since 2.5
import threading
import time
NULL = 0
@Ricordel
Ricordel / Bouton.java
Created August 23, 2013 21:54
Java button
import javax.swing.*;
import java.awt.event.*;
public class Bouton
{
static int i = 0;
static JButton button;
static JFrame mainWindow;
@Ricordel
Ricordel / scala_sign_detection.scala
Last active December 17, 2015 04:49
Sign detection in Scala
////////////////////////////////////////////////////////////////////////////////
//
// To implement the Sign arithmetic, we can do it in several steps:
// - first we must define the arithmetic on the "base" values:
// Pos, Neg, Zero, NoneA, ErrA
// - then we can deduce the arithmetic of the whole domain by using
// upper bounds
//
// The aforementioned reduction to core signs can be performed on both
// operands: the left and the right.
@Ricordel
Ricordel / gist:2029762
Created March 13, 2012 16:28
Ce qui serait cool pour un vim-ide
Montrer l'arbre d'appel à partir de l'AST, i.e que la fonction f() eut être appelée par g1(), g2(), g3(), ... et récursivement.
Aller au début/fin de la fonction en cours
@Ricordel
Ricordel / vim-cheatsheet
Created March 12, 2012 22:58
Vim cheat-sheet of the moment
gf : ouvrir le fichier sous le curseur
[<Tab> : Aller à la définition du symbole dans le header
:Mru : liste des derniers fichiers utilisés, priceless
Ce que je veux dans ma barre de statut
- nom du fichier
- modified flag
- RO flag