Skip to content

Instantly share code, notes, and snippets.

View kakwa's full-sized avatar

Carpentier Pierre-Francois kakwa

View GitHub Profile
@kakwa
kakwa / all-files-travis-osx.txt
Last active April 13, 2016 20:58
All files on OSX travis environment
This file has been truncated, but you can view the full file.
Worker information
hostname: worker-jupiter-brain:a44f9141-8894-42a4-96e7-823bc985a583
version: v2.0.0 https://github.com/travis-ci/worker/tree/ca6cb0c5d3920912b1c3acc87c44a5da2120a971
instance: 5abda7c9-3155-4a26-946a-fa6863ff0ede:
startup: 1m2.404846282s
Build system information
Build language: cpp
Build group: stable
Build dist: precise
@kakwa
kakwa / daemon-skel.pl
Last active April 7, 2016 15:58
Skeleton script for perl daemon
#!/usr/bin/env perl
use strict;
use warnings;
# command line parsing
use Getopt::Long;
# pid file handling
use File::Pid;
# logs
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h> /* for offsetof() macro */
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
typedef struct _dibImg {
uint8_t *img;
@kakwa
kakwa / wRle8ToBitmap.c
Last active January 22, 2016 00:27
uncompress Windows RLE8 to get bitmap
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h> /* for offsetof() macro */
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
typedef struct _dibImg {
char *img;
@kakwa
kakwa / gist:5513898
Created May 3, 2013 20:39
I just never remember how to format a date with ```date```, it's useful from time to time to have it
`date +"%F-%H%M%S"`
cloc --not-match-f='.*.js|.*.css|.*.less' ./
743 text files.
623 unique files.
7394 files ignored.
http://cloc.sourceforge.net v 1.60 T=1.69 s (174.7 files/s, 25039.8 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Python 74 1728 2046 7577
@kakwa
kakwa / start.sh
Created December 7, 2015 16:45
start all vms on an esxi host
#!/bin/sh
vim-cmd vmsvc/getallvms | awk '{print $1}' | while read id; do vim-cmd vmsvc/power.on $id;done
#!/bin/sh
RCol='\33[0m' # Text Reset
# Regular Bold Underline High Intensity BoldHigh Intens
Bla='\33[0;30m'; BBla='\33[1;30m'; UBla='\33[4;30m'; IBla='\33[0;90m'; BIBla='\33[1;90m';
Red='\33[0;31m'; BRed='\33[1;31m'; URed='\33[4;31m'; IRed='\33[0;91m'; BIRed='\33[1;91m';
Gre='\33[0;32m'; BGre='\33[1;32m'; UGre='\33[4;32m'; IGre='\33[0;92m'; BIGre='\33[1;92m';
Yel='\33[0;33m'; BYel='\33[1;33m'; UYel='\33[4;33m'; IYel='\33[0;93m'; BIYel='\33[1;93m';
Blu='\33[0;34m'; BBlu='\33[1;34m'; UBlu='\33[4;34m'; IBlu='\33[0;94m'; BIBlu='\33[1;94m';
@kakwa
kakwa / ghipr.py
Last active November 21, 2015 12:51
Quick and dirty script to display the number of opened issues and PRs on a list of Github projects
#!/usr/bin/env python
import urllib2
import json
import sys
import codecs
import base64
# Quick and dirty script to display the number of opened issues and PRs on a list of Github projects
@kakwa
kakwa / get_rdvx.sh
Created August 14, 2015 20:41
An ugly script to recover and rename "Rendez-Vous avec Monsieur X" recordings.
#!/bin/bash
# An ugly script to recover and rename "Rendez-Vous avec Monsieur X" recordings.
# (past radio show from french station France Inter).
# It also resets id3 tags and sets them to correct values.
i=1
wget -O - http://rendezvousavecmrx.free.fr/page/liste.php\?tri\=4 | \
grep mp3 |grep href | \
sed 's/.*href="\(.*\)".*src=.*alt.*title="\(.*\)".*/\1:\2/p;d'\