Skip to main content


Showing posts from 2018

Confluence REST add Page

How to add a Confluence Page as a child of an existing page via the REST API Then Confluence API examples are good, but they don't mention how to specify a parent page, under which I want the newly created page must be.
Thanks to and , this is the solution:
curl -u mihamina:my_password -X POST -H 'Content-Type: application/json' -d '{ "type":"page", "title":"Andrana", "ancestors":[{"id":"61145092"}], "space":{"key":"MVT"}, "body":{"storage":{"value":"This is a new page", "representat…

Vsftpd LXC ERR500

VSFTPD in container list error 500 When running VSFTPD in a container (LXC here, did not try on Docker), default configuration makes directory listing unavailable.
Listing directory content generate an Error 500: $ lftp cd ok, cwd=/os lftp> ls ls: Fatal error: 500 OOPS: This is due to the fact VSFTPD use "seccomp" (well, dont ask what it is: I dont know) In order to work arround, I just had to add this line to the VSFTPD configuration: seccomp_sandbox=NO There are many references to this, no need for me to be anotehre reference, I just wrote this article as a reminder for myself:

disorder file awk

Randomize a file lines with AWKThe goal here is simple:

I have a file (music playlist, user list,...)I want to disorder it, just like I woul beat the cardsI asked this a long time ago on Usenet (fr.comp.os.unix), and I got this anwser from St├ęphane CHAZELAS.

If the file is not too big:
awk < fichier '{a[n++]=$0} END{for(srand();n--;a[i]=b) {b=a[n];a[n]=a[i=int(rand()*NR)]}; while(++n<NR)print a[n]}'

awk < fichier 'BEGIN{srand()}{print rand(),$0}'  | sort -k1,1 | cut -d -f2-
I write it down here just for the archives

mediadrop direct publishing

Make uploaded videos directly published At ESTI I needed a special feature:

Students need to upload videos as anonymousAs soon as uploaded, videos need to be in the published state

Mediadrop default workflow is to have videos go through a precise workflow, as stated in the documentation.
Of course this is not what I want.
I looked for a way to hack it in order to get what I want.

I achieved this with these too commits:
Drawbacks This is a dirty hack. To make it clean, I need make it configurable through the administration interface, which is not the case as is.
That will be the next step, but let's go live for the moment.

centos kickstart gdm

Starting GDM after a Kickstart installation When installing CentOS7 from Kickstart, GDM is not starting at boot.
This is because the default target is "multi-user":

ls -l /etc/systemd/system/ lrwxrwxrwx. 1 root root 41 Mar 24 01:53 /etc/systemd/system/ -> /usr/lib/systemd/system/
To solve this, I put these lines in the "%post" section:

%post rm /etc/systemd/system/display-manager.service rm /etc/systemd/system/ ln -sf /usr/lib/systemd/system/ /etc/systemd/system/ ln -sf /usr/lib/systemd/system/gdm.service /etc/systemd/system/display-manager.service %end

HAProxy HTTPS SSH Bitbucket

Atlassian Bitbucket Bitbucket is a software developped by Atlassian and I define it like an interface to Git, in order to make it more friendly.
There is a bunch of software in Bitbucket, acting as layers in order to facilitate collaboration on code.
Last but not least, Bitbucket has a good integration with Jira, which is one of the main reasons I choosed it to be our tool at ESTI.
I thank Atlassian very much for metting ESTI use community licence of both Jira and Bitbucket.

The goal: HTTPS and SSH on regular ports Default HTTP and SSH port for Bitbucket is neither 443 nor 22. Their are configurable and it would be possible to directly make Bitbucket face those ports, but we dont like that, we'd rather setup a HAProxy instance that will forward the ports for us.
Prerequisite for that is to have a HTTPS certificate. It might be self signed or not. The one I use is not self-signed, and I bought it to Gandi, which provides an intermediate SHA2 certificate.

To sum it up, I have in my…

new google calendar week number

Display week number in the new Google Calendar For several Google accounts, Google has enabled the new calendar interface.
They are globally nice, but they do not enable the week number display.
This is not trivial to enable, but here we are:
Go to the "Settings"Go to "Browse Calendars of interest"At the very bottom, check "Week numbers"

The week number will be displayed in the
"Month view": at each start of the month"Week view": under "Monday" It wont be displayed for
"Day view""Year view"