This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from HTMLParser import HTMLParser | |
import urllib2 | |
import re | |
# create a subclass and override the handler methods | |
class MyHTMLParser(HTMLParser): | |
def __init__(self): | |
"""Initialize and reset this instance.""" | |
self.flag = False | |
self.reset() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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'\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
vim-cmd vmsvc/getallvms | awk '{print $1}' | while read id; do vim-cmd vmsvc/power.on $id;done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`date +"%F-%H%M%S"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
# command line parsing | |
use Getopt::Long; | |
# pid file handling | |
use File::Pid; | |
# logs |