Skip to content

Instantly share code, notes, and snippets.

View julienfastre's full-sized avatar

Julien Fastré julienfastre

  • Champs-Libres
  • Liège, Belgium
View GitHub Profile
@julienfastre
julienfastre / calcul_citerne.py
Created June 8, 2020 09:31
calcul dimensionnement citerne eau de pluie
from datetime import date
import csv
def fromisoformat(date_string):
t = date_string.split('-')
return date(int(t[0]), int(t[1]), int(t[2]))
startdate = fromisoformat('2015-01-01')
startlevel = 0.0
@julienfastre
julienfastre / CatalogWithProblem.xml
Created November 10, 2017 09:45
killbill Failed to load overridden plan for tenant
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="catalog.xsd ">
<effectiveDate>2017-11-09T21:49:00+00:00</effectiveDate>
<catalogName>Comedien.be</catalogName>
<recurringBillingMode>IN_ADVANCE</recurringBillingMode>
[out:json][timeout:50];
// fetch area “Belgium” to search in
{{geocodeArea:"Région Bruxelles Capitale"}}->.searchArea;
// gather results
(
// query part for: “drinking water”
node["amenity"="drinking_water"](area.searchArea);
way["amenity"="drinking_water"](area.searchArea);
)->.d;
@julienfastre
julienfastre / README.md
Last active September 22, 2015 18:15
POC: cryptographic signature in composer package

Include cryptographic signature in composer package

See this issue for more information : composer/composer#38

THIS IS A PROOF OF CONCEPT. If the test does work, this could become a composer plugin.

Prerequesites: installation of gnupg (PECL extension)

@julienfastre
julienfastre / disable_temporary_gnome_keyring.md
Last active September 9, 2015 07:35
The GNOME keyring manager hijacked the GnuPG agent.

On...

$ gpg2 --card-status
gpg: WARNING: The GNOME keyring manager hijacked the GnuPG agent.
gpg: WARNING: GnuPG will not work properly - please configure that tool to not interfere with the GnuPG system!

The gpg-agent is hijacked by gnome keyring :

Keybase proof

I hereby claim:

  • I am julienfastre on github.
  • I am julienfastre (https://keybase.io/julienfastre) on keybase.
  • I have a public key whose fingerprint is 82A9 125E D63E A417 6E52 4390 BFBC CBB5 5257 7F34

To claim this, I am signing this object:

def calc(length, use):
if use == 10:
speed = 120
elif use == 11:
speed = 80
elif use == 20 or use == 21:
speed = 90
elif use == 22 or use == 30 or use == 31 or use == 32:
speed = 50
elif use == 40 or use == 50:
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import piface.pfio as pfio
from time import sleep
LED_RED_0 = 1
LED_RED_1 = 2
LED_GREEN_0 = 5
@julienfastre
julienfastre / test-id.php
Created April 30, 2012 14:40
test the risk of occurence of an uniqueid
<?php
$a = array();
class IdProvider {
private $n = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
public function createId() {
$s = '';