Github get the contributor list of a repository

Quick tip to retrieve the contributor list of a given repository. Example bellow with ceph-ansible:

$ curl -s https://api.github.com/repos/ceph/ceph-ansible/stats/contributors | grep login | awk -F ":" '{print $2}' | sed 's/"/,@/;s/,$//;s/"$//' | tr -d '\n'
,@bmanojlovic ,@hunter ,@guits ,@lorin ,@marmot21 ,@mcsage ,@byronmccollum ,@maethor ,@mhubig ,@laboshinl ,@fcharlier ,@bstillwell ,@lyandrew ,@jjoos ,@BjoernT ,@psy-q ,@bsanders ,@pb-it ,@eikef ,@lpabon ,@ti-mo ,@alfredodeza ,@aisrael ,@andymcc ,@Abhishekvrshny ,@gpocentek ,@Logan2211 ,@git-harry ,@darkcrux ,@nexecook ,@rootfs ,@crcceph ,@mattt416 ,@bengland2 ,@bjne ,@HanXHX ,@andrewschoen ,@matthewrees ,@xals ,@jcftang ,@flisky ,@guestisp ,@msambol ,@leseb

Now you can easily ping them.

Read On...

Feel the awk power

Some of my favorite AWK expressions:

OSD_LISTEN_PORTS:$(netstat -tlpn | awk -F ":" '/ceph-osd/ { sub (" .*", "", $2); print $2 }' | uniq)
NETWORK=$(ip -4 -o a | awk '/eth0/ {print $4}')
IP=$(ip -4 -o a | awk '/eth0/ { sub ("./..", "", $4); print $4 }')


Because grep foo | awk '{print $1}' is not elegant!

Read On...

A gentle introduction to the erasure coding

The erasure coding is currently a very hot topic for distributed storage systems. It has been part of the Ceph roadmap for almost a year and Swift guys recently brought the discussion to the table. Both of them have planned to implement the erase code functionality so I thought it might be interesting to give a high level overview about the erasure coding principles. Before we start, I’d like to point out that I don’t take any credit for this article. I just read the wonderful white paper “Erasure Coding vs. Replication: A Quantitative Comparison” written by Hakim Weatherspoon and John D. Kubiatowicz from Computer Science Division University of California, Berkeley. Many thanks to them. While ready the paper, I found their introduction to the erasure code easy to understand for a novice like me :).

Read On...

Consistent hosts file with Ansible

One of the things, that I hate the most about an infrastructure is to have an inconsistent platform. Obviously DNS runs but it could fail, and then it’s always good to rely on your /etc/hosts. However before this, it must be consistent.

Read On...

Purge some MySQL binary logs

The default value of the variable expire_logs_days is 10 days, most of the time this is way too long. This mini how-to shows how to change this value. Fortunately expire_logs_days is a dynamic variable so we can edit it while MySQl runs, we don’t need to restart the server.

Read On...

Sound problems with Chrome 24 on Mac OS X 10.8.2

Shortest article ever written on my blog…

From time to time I notice that switching from my audio local source to my Airplay station (and the other way around) somehow muted the sound on Chrome. After some googling I noticed that the problem came from a flash player plugin. You just need to disable it.

For this go to chrome://plugins, Show details an then disable the PPAPI plugin located in:

/Applications/Google Chrome.app/Contents/Versions/24.0.1312.52/Google Chrome Framework.framework/Internet Plug-Ins/PepperFlash/PepperFlashPlayer.plugin

Hope it helps! `

Read On...