Skip to content

Instantly share code, notes, and snippets.

View tzi's full-sized avatar
👨‍🎓
enseigner les CSS

Thomas ZILLIOX tzi

👨‍🎓
enseigner les CSS
View GitHub Profile
@tzi
tzi / update-with-select.sql
Created January 13, 2014 15:41
UPDATE SQL REQUEST with a SELECT on the same table
UPDATE team JOIN (
SELECT
team.id as team,
edition.id as edition
FROM team
JOIN participation ON participation.team=team.id
JOIN race ON race.id=participation.race
JOIN edition ON edition.id=race.edition
) as tmp
ON team.id = tmp.team
@tzi
tzi / dabblet.css
Created May 28, 2013 01:17
Untitled
body {
margin: 0;
}
.bou {
padding: 1em;
color: black;
}
@media (min-width: 320px) {
@tzi
tzi / gist:5255011
Created March 27, 2013 15:18
FBFilterVideo.js
(function filterArticle() {
var querySettings = [
[".uiUnifiedStory", ".shareRedesignVideo"],
[".fbTimelineUnit", "._1xz"]
];
var keepVideoContainer = function keepVideoContainer(articles, queryEmbedVideo) {
for ( var i = 0; i < articles.length; i++) {
var video = articles[i].querySelectorAll(queryEmbedVideo);
if (video.length == 0) {
articles[i].parentNode.removeChild(articles[i]);
@tzi
tzi / dabblet.css
Created March 21, 2013 14:30
Untitled
.bou:first-child {
background: red;
}
.bou {
background: blue;
}
@tzi
tzi / checkNoUtf8.sh
Last active December 14, 2015 12:59
Bash: Check that no files are in UTF-8
function checkNoUtf8() { for i in $1/*; do if [ -d "$i" ]; then checkNoUtf8 $i; else encoding=$(file -bi $i); encoding=${encoding##*=}; if [ "$encoding" == "utf-8" ]; then echo "$i: $encoding"; fi; fi; done }; checkNoUtf8 .
@tzi
tzi / DGSStatusRefresh.user.js
Last active December 10, 2015 03:48
DGSStatusRefresh
// ==UserScript==
// @name DGSStatusRefresh
// @description Automaticaly refresh the status page
// @id me.zilliox.DGSStatusRefresh
// @homepageURL http://userscripts.org/scripts/show/154963
// @supportURL http://userscripts.org/scripts/discuss/154963
// @updateURL http://userscripts.org/scripts/source/154963.meta.js
// @author tzi
// @namespace http://zilliox.me
// @include *.dragongoserver.net/status.php*
@tzi
tzi / DGSReduceMessageBox.user.js
Created December 20, 2012 17:06
DGSReduceMessageBox
// ==UserScript==
// @name DGSReduceMessageBox
// @description Reduce message box area on DragonGoServer to use screen estate more efficiently
// @id me.zilliox.DGSReduceMessageBox
// @homepageURL http://userscripts.org/scripts/show/154575
// @supportURL http://userscripts.org/scripts/discuss/154575
// @updateURL http://userscripts.org/scripts/source/154575.meta.js
// @author tzi
// @namespace http://zilliox.me
// @include *.dragongoserver.net/game.php?*
@tzi
tzi / userscript.user.js
Created November 9, 2012 15:46
An empty #userscript that works on Greasemonkey and Chrome
// ==UserScript==
// @name {{NAME}}
// @description {{DESCRIPTION}}
// @id me.zilliox.{{NAME}}
// @homepageURL http://userscripts.org/scripts/show/{{ID}}
// @supportURL http://userscripts.org/scripts/discuss/{{ID}}
// @updateURL http://userscripts.org/scripts/source/{{ID}}.meta.js
// @author tzi
// @namespace http://zilliox.me
// @include {{WEBSITE}}
@tzi
tzi / pidoa.php
Created September 24, 2012 21:52
Pidoa - Rename TV shows files automatically
<?php
function usage( $argv ) {
echo PHP_EOL .
'Pidoa' . PHP_EOL .
'------------' . PHP_EOL .
'This script allow you to rename tv shows easily' . PHP_EOL .
PHP_EOL .
'Usage: php ' . $argv[ 0 ] . ' <folder_path> <pattern>' . PHP_EOL .
'Example: php ' . $argv[ 0 ] . ' ./ "Babylon 5 S%Sx%E %V"' . PHP_EOL .
@tzi
tzi / lettre.md
Created September 17, 2012 12:43
Lettre à un service stockant votre mot de passe en clair

Bonjour.

Je constate que vous stockez sûrement mon mot de passe personnel et secret en clair sur vos serveurs. Je constate aussi que vous vous permettez de le diffuser par mail, quitte à risquer de le dévoiler à une tierce personne.

Sauf erreur de ma part, le choix technique que vous avez réalisé n'est pas juste envers les utilisateurs qui vous font confiance. Votre système d'identification est basé sur le fait que la seule personne qui connaît la forme lisible d'un mot de passe est son propriétaire. Or, vous stockez ce mot de passe en clair. Si une faille de sécurité est détectée sur vos serveurs, vous ne pourrez pas savoir si un mot de passe a perdu son intégrité.