Skip to content

Instantly share code, notes, and snippets.

@leblanc-simon
leblanc-simon / ParsedownCheckbox.php
Created May 29, 2019
avoid double encoding with line
View ParsedownCheckbox.php
<?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 Jan 16, 2019 — forked from romain-huyvaert/cards.html
Génération de tickets pour les scénarii Scrum
View cards.html
<!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 Nov 23, 2018
Gestion des fichiers pour le calcul et l'optimisation des découpes de morceaux de bois
View optimisation_decoupes.php
<?php
function buildDxf($original_datas) {
$template = ' 0
SECTION
2
HEADER
9
$ACADVER
1
@leblanc-simon
leblanc-simon / publish_mattermost.py
Created Jul 24, 2018
Publish a mattermost message from email
View publish_mattermost.py
# -*- 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
A symfony command which allow to create all configuration in RabbitMQ according to old_sound_rabbit_mq configuration
View InitRabbitmqCommand.php
<?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 Apr 7, 2018
Install and conifgure Vich with LiipImagine
View prepare_vich.sh
#!/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 Nov 14, 2016
Génération de tickets pour les scénarii Scrum
View cards.html
<!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.
View README.md

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

View gist:8d56717dbc9ebf552756
Verifying that +leblanc_simon is my blockchain ID. https://onename.com/leblanc_simon
@leblanc-simon
leblanc-simon / get_password_odoo.py
Created Jun 30, 2015
Get password from Odoo session
View get_password_odoo.py
#!/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)
You can’t perform that action at this time.