Skip to content

Instantly share code, notes, and snippets.

MonsieurV / example.ovpn
Created Sep 8, 2019
How to include or exclude traffic from routing to an OpenVPN connection?
View example.ovpn
dev tun
proto udp
remote X.X.X.X 1194
# ----------------
# Routing configuration pulling
# ----------------
MonsieurV /
Created Mar 8, 2019
Django multi-cookie name session
This is a variation of Django default SessionMiddleware middleware
to allow to resolve different cookie name following our own logic.
For e.g., you could set a different cookie name following the
HTTP path. (You could as well do the same with the host and/or referer)
Beware that this has side-effects if you uses
MonsieurV / createImageBitmap.js
Last active Feb 16, 2021
createImageBitmap polyfill with Blob and ImageData source support
View createImageBitmap.js
* Safari and Edge polyfill for createImageBitmap
* Support source image types Blob and ImageData.
* From:
* Updated by Yoan Tournade <>
if (!('createImageBitmap' in window)) {
View pi_barcode.php
// ******************************************************** 2013 *****
// ***** CODES A BARRES - Php script *****
// *****************************************************************************
// ***** (c) 2002 - - *****
// *****************************************************************************
// *****************************************************************************
// ***** Ce script est "FREEWARE", il peut etre librement copie et reutilise
// ***** dans vos propres pages et applications. Il peut egalement etre modifie
MonsieurV / style.css
Created Oct 13, 2017
View style.css
.DateRangePicker {
position: relative;
display: inline-block
.DateRangePicker_picker {
z-index: 1;
background-color: #fff;
position: absolute
.DateRangePicker_picker__rtl {

Keybase proof

I hereby claim:

  • I am monsieurv on github.
  • I am yoant ( on keybase.
  • I have a public key ASDptqY0mO7MsNS0JrYEfZAC14InNXwkSFreZ9HY1y-d_wo

To claim this, I am signing this object:

MonsieurV /
Last active May 3, 2019
This script simply mass delete mails from a mailbox through a POP3 access. May be useful when you want to clear an Inbox of spams & all.
This script simply mass delete mails from a mailbox
through a POP3 access.
May be useful when you want to clear an Inbox of spams & all.
** CAUTION ** After you have selected the number of messages to delete and pressed
Enter, it really does begin to delete the emails in a permanent way. (Without passing by a trash folder)
Note: the removal is actual when the script close the POP3 connection
MonsieurV /
Created Nov 10, 2016
My Little Sister Triangle Geometry Problem
# The objective was to find all possible triangles
# that can have the sum of their three sides sizes equal to 10.
# (We consider only integer side sizes).
# I'm not good at Maths, and it was no obvious to
# enumarate all solutions, so I just wrote a program
# to do it for me.
eq_solutions = []
problem_solutions = []
y = 10
MonsieurV /
Created Nov 9, 2016
PyFPDF -- Images concatenation in PDF file
# Code from
from fpdf import FPDF
pdf = FPDF('P', 'mm', 'A4')
for image in ['file1.jpg', 'file2.jpg', 'file3.jpg', 'file4.jpg', 'file5.jpg']:
# Take full page.
# Doc.
pdf.image(image, 0, 5, 210)
pdf.output("output.pdf", "F")
MonsieurV / monit.output
Created Apr 23, 2016
Monit status command ouput
View monit.output
The Monit daemon 5.9 uptime: 8m
Process 'radbox-web'
status Running
monitoring status Monitored
pid 17910
parent pid 1
uid 0
effective uid 0
gid 0