Skip to content

Instantly share code, notes, and snippets.

@leblanc-simon
leblanc-simon / whois.php
Last active April 6, 2020 13:01
Simple Whois web interface
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
function removeNotice($whois)
{
return str_replace('NOTICE: The expiration date displayed in this record is the date the
registrar\'s sponsorship of the domain name registration in the registry is
currently set to expire. This date does not necessarily reflect the expiration
date of the domain name registrant\'s agreement with the sponsoring
@leblanc-simon
leblanc-simon / date.php
Created April 23, 2014 22:55
Simple date visualisation
<?php
$now = time();
setlocale(LC_TIME, 'fr_FR.utf8','fra');
$french_date = strftime('%A %d %B %Y %T', $now);
?><!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8"/>
<title>What time is it ?</title>
@leblanc-simon
leblanc-simon / bzr-merge.py
Last active May 25, 2019 22:21
Bazaar merge utils
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
from datetime import date
import argparse
import ConfigParser
class CommandPrepare:
@leblanc-simon
leblanc-simon / documentation-gesdon.md
Created March 15, 2015 22:01
documentation Gesdon

Installation de Gesdon

$ cd web
$ git clone https://github.com/leblanc-simon/Gesdon.git
$ cd Gesdon
$ composer install
$ cd config
$ cp config.example.php config.php
@leblanc-simon
leblanc-simon / index.html
Created May 1, 2015 12:54
Open Password Generator
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<title>OPG : Open Password Generator</title>
<style>
html, body {
margin: 0;
padding: 0;
width: 100%;
@leblanc-simon
leblanc-simon / composer.json
Last active August 29, 2015 14:20
URL expand
{
"require": {
"predis/predis": "~1"
}
}

Keybase proof

I hereby claim:

  • I am leblanc-simon on github.
  • I am leblancsimon (https://keybase.io/leblancsimon) on keybase.
  • I have a public key whose fingerprint is 181A E85C 78A3 4464 896C 8CBB 3825 AC59 FCD3 3571

To claim this, I am signing this object:

@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)
Verifying that +leblanc_simon is my blockchain ID. https://onename.com/leblanc_simon

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