Skip to content

Instantly share code, notes, and snippets.

@abusque
abusque / quicksort_aired_out.c
Created April 5, 2015 16:44
This is an "aired-out" version of Mark Sheppard's 145 bytes quicksort
/*
* This is an "aired-out" version of Mark Sheppard's
* 145 bytes quicksort, also found on GitHub Gist:
* https://gist.github.com/marksheppard/31cd41b527efe1187983
*/
s(*l, n)
{
int i, j;
if(n > 1) {
@abusque
abusque / lttng_versions.md
Last active August 29, 2015 14:15
LTTng Version Naming

LTTng version naming

Since LTTng 2.0, each release wears the name of a Quebec microbrewed beer.

2.7 Herbe à Détourne

Brewed with unrestrained amounts of Citra hop, the Herbe à Détourne is a fantastic New World Tripel brewed by Dieu du Ciel!. Aromas of mango, cantaloupe melon and passion fruit, combined with a controlled bitter finish, unite in making this smooth golden-orange beer stand apart.

@abusque
abusque / primeFactorials.java
Last active December 11, 2015 06:49
Le programme qui m'a fait remporter une première place dans une compétition d'informatique. Fait la décomposition en facteurs premiers de la factorielle d'un nombre.
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.util.List;
import java.util.ArrayList;
class PrimeNumbers {
public static void main (String[] args) throws NumberFormatException, IOException
{
List<Integer> inputInts = new ArrayList<Integer>();
@abusque
abusque / gist:986185
Created May 23, 2011 03:38
Quicksort haskell
quicksort :: (Ord a) => [a] -> [a]
quicksort [] = []
quicksort (x:xs) =
let smallerSorted = quicksort [a | a <- xs, a <= x]
biggerSorted = quicksort [a | a <- xs, a > x]
in smallerSorted ++ [x] ++ biggerSorted