Skip to content

Instantly share code, notes, and snippets.

@leblanc-simon
leblanc-simon / ParsedownCheckbox.php
Created May 29, 2019 23:19
avoid double encoding with line
<?php
class ParsedownCheckbox extends ParsedownExtra
{
protected function checkboxUnchecked($text)
{
if ($this->markupEscaped || $this->safeMode) {
$text = self::escape($text);
// Disable escape to convert data with line (avoid double encoding)
@leblanc-simon
leblanc-simon / cards.html
Created January 16, 2019 13:20 — forked from romain-huyvaert/cards.html
Génération de tickets pour les scénarii Scrum
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8"/>
<title>Génération de tickets pour les scénarii Scrum</title>
<!--
Copyright © 2016 Simon Leblanc <contact@leblanc-simon.eu>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
@leblanc-simon
leblanc-simon / optimisation_decoupes.php
Created November 23, 2018 00:47
Gestion des fichiers pour le calcul et l'optimisation des découpes de morceaux de bois
<?php
function buildDxf($original_datas) {
$template = ' 0
SECTION
2
HEADER
9
$ACADVER
1
@leblanc-simon
leblanc-simon / publish_mattermost.py
Created July 24, 2018 01:40
Publish a mattermost message from email
# -*- coding: utf-8 -*-
from email.parser import Parser
from email.header import decode_header
import json
import pyinotify
import requests
from StringIO import StringIO
import sys
import tempfile
@leblanc-simon
leblanc-simon / InitRabbitmqCommand.php
Created May 20, 2018 16:05
A symfony command which allow to create all configuration in RabbitMQ according to old_sound_rabbit_mq configuration
<?php
namespace AppBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\AbstractConfigCommand;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\Console\Exception\LogicException;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
@leblanc-simon
leblanc-simon / prepare_vich.sh
Created April 7, 2018 21:18
Install and conifgure Vich with LiipImagine
#!/bin/bash
# Install Symfony 3.4
symfony new vich lts
# Go to the directory
cd vich
# Remove the parameters.yml to populate with good value
rm app/config/parameters.yml
@leblanc-simon
leblanc-simon / cards.html
Created November 14, 2016 00:04
Génération de tickets pour les scénarii Scrum
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8"/>
<title>Génération de tickets pour les scénarii Scrum</title>
<!--
Copyright © 2016 Simon Leblanc <contact@leblanc-simon.eu>
This work is free. You can redistribute it and/or modify it under the
terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.

Sonde Nagios de vérification de site web

Cette sonde permet de vérifier des sites web :

  • vérification du HTTP Status Code (2xx)
  • vérification de la présence d'un terme dans la page
  • vérification du temps de chargement

Utilisation du script

Verifying that +leblanc_simon is my blockchain ID. https://onename.com/leblanc_simon
@leblanc-simon
leblanc-simon / get_password_odoo.py
Created June 30, 2015 10:13
Get password from Odoo session
#!/usr/bin/python
import os
from werkzeug.contrib.sessions import FilesystemSessionStore
session_store = FilesystemSessionStore(os.path.expanduser('~/.local/share/Odoo/sessions'))
passwds = []
for sid in session_store.list():
session = session_store.get(sid)