Skip to content

Instantly share code, notes, and snippets.

View Arkanosis's full-sized avatar

Jérémie Roquet Arkanosis

View GitHub Profile
@Arkanosis
Arkanosis / compressors_benchmark.sh
Created October 12, 2015 16:48
Naive benchmark of compressors
#! /usr/bin/env zsh
# Naive benchmark of compressors
# (C) 2015 Jérémie Roquet <jroquet@arkanosis.net>
# Disclaimer: only one run per program to get an idea, do not rely on the results!
# TODO wrapper for lzham because lzhamtest is not pipe-friendly (it needs to know the input size)
file=frwiki-20151002.xml
@Arkanosis
Arkanosis / installed.sh
Created July 13, 2014 15:01
Get installed packages list
comm -23 <(aptitude search '~i!~M' -F '%p' | sort -u | sed 's/ *$//') <(wget -qO - http://cdimage.ubuntu.com/kubuntu/releases/12.04/release/kubuntu-12.04-dvd-amd64.manifest | cut -f1 | sort -u) >| ~/Documents/packages.txt
@Arkanosis
Arkanosis / tel2txt.py
Created June 13, 2014 17:15
Script that converts a phone number to alternatives phone “words”
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
_num2char = [
'0+ ',
'1 ',
'2ABC ',

Keybase proof

I hereby claim:

  • I am arkanosis on github.
  • I am arkanosis (https://keybase.io/arkanosis) on keybase.
  • I have a public key whose fingerprint is FA49 0B15 D054 C7E8 3F70 B040 8C14 5ABA C11F A702

To claim this, I am signing this object:

@Arkanosis
Arkanosis / gist:1178515
Created August 29, 2011 14:33
Compile-time selection of implemented methods
#include <cassert>
template <typename A, int (A::*)() const = &A::fun>
struct Checker;
template <typename A>
bool checkAndSet(int& res, const A& a, Checker<A>* = 0)
{
res = a.fun();
return false;
@Arkanosis
Arkanosis / properties.cpp
Last active May 14, 2023 16:53
C# style properties in C++
/*
** C# style properties in C++
** (C) 2010 Arkanosis
** jroquet@arkanosis.net
**
** Example code released under the MIT license
** http://www.opensource.org/licenses/mit-license.php
**
** This is an original portable version of
** http://www.codeproject.com/KB/cpp/properties.aspx
@Arkanosis
Arkanosis / properties.cpp
Last active May 14, 2023 17:36
Python style properties in C++
/*
** Python style properties in C++
** (C) 2010 Arkanosis
** jroquet@arkanosis.net
**
** Example code released under the MIT license
** http://www.opensource.org/licenses/mit-license.php
**
** This is an original portable version of
** http://www.codeproject.com/KB/cpp/properties.aspx