Skip to content

Instantly share code, notes, and snippets.

View guillaumevincent's full-sized avatar

Guillaume Vincent guillaumevincent

View GitHub Profile
@guillaumevincent
guillaumevincent / Données.md
Last active June 7, 2016 03:04
Devore ressources

Données à récolter

  • poids
  • rythme cardiaque réveil
  • prix des achats
  • temps de transformation
  • provenance des produits
  • temps pour faire les courses
  • distance parcourue entre lieux d'achat et domicile
@guillaumevincent
guillaumevincent / test_xmldiff.py
Last active April 26, 2023 18:58
compare two XML in python
import json
import unittest
import xmltodict
class XmlDiff(object):
def __init__(self, xml1, xml2):
self.dict1 = json.loads(json.dumps((xmltodict.parse(xml1))))
self.dict2 = json.loads(json.dumps((xmltodict.parse(xml2))))
@guillaumevincent
guillaumevincent / test_xmldiff.py
Last active August 29, 2015 14:21
xml diff in python with xmltodict
import unittest
from xmldiff import XmlDiff
class XMLDiffTestCase(unittest.TestCase):
def test_xml_equal(self):
xml1 = """<a></a>"""
xml2 = """<a></a>"""
self.assertTrue(XmlDiff(xml1, xml2).equal())
@guillaumevincent
guillaumevincent / console.log
Created July 5, 2015 18:44
Copy img to usb on Mac OS X
~ diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *121.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 120.5 GB disk0s2
3: Apple_Boot Recovery HD 650.1 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD *120.1 GB disk1
@guillaumevincent
guillaumevincent / Gulpfile.js
Created December 2, 2015 11:53 — forked from thom4parisot/Gulpfile.js
gulp -> npm scripts only
'use strict';
var pkg = require('./package.json');
var gulp = require('gulp');
var utils = require('gulp-util');
var source = require('vinyl-source-stream');
var isWatching = false;
var isProduction = process.env.NODE_ENV === 'production';
@guillaumevincent
guillaumevincent / index.js
Last active December 30, 2015 13:00
requirebin sketch
var crypto = require('crypto');
var loading = document.createElement('p');
var iterations = 10;
crypto.pbkdf2('password', 'salt', iterations, 32, 'sha256', function (error, key) {
if (error) {
console.log(error);
}
loading.innerHTML = 'key:' + key.toString('hex');
document.body.appendChild(loading);
});
<table width="400" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="87" height="82">
<img alt="birdLogo" src="http://akema.fr/images/akema_logo_signatures.jpg" width="130"
height="45" style="margin: 0; border: 0; padding: 0; display: block;">
</td>
<td width="3" bgcolor="#7234C7">
</td>
<td width="310" height="82"
style="padding-left:10px; font-family: sans-serif; color: #747b82; font-size: 12px;">
The MIT License (MIT)
Copyright (c) Guillaume Vincent <guillaume@oslab.fr> (guillaumevincent.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
<table width="400" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="119" height="82">
<img alt="logo" src="http://okiwi.org/img/okiwi.png" width="92"
height="74" style="margin: 0; border: 0; padding: 0; display: block;">
</td>
<td width="3" bgcolor="#8B6849">
</td>
<td width="310" height="82"
style="padding-left:10px; font-family: sans-serif; color: #8B6849; font-size: 13px;">