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 / SassMeister-input.scss
Created November 24, 2014 23:05
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
// Attributes
// ----------------------------------
$grid-default-column-count: 12 !default;
@tzi
tzi / index.html
Last active August 29, 2015 14:18
Lazyload example
<!doctype html>
<title>lazyloading images</title>
<link rel="stylesheet" href="styles.css" />
<script src="lazyload.min.js"></script>
<div class="popin">
<h1>simple images example</h1>
<h2>scroll for more</h2>
<div class="pad">
<img
@tzi
tzi / coachlabrute.user.js
Created April 22, 2015 14:16
Userscript pour Labrute.fr : Ajoute des métriques pour suivre la progression de ses brutes
// ==UserScript==
// @name CoachLaBrute
// @description Ajoute des métriques pour suivre la progression de ses brutes
// @id fr.tzi.CoachLaBrute
// @namespace http://tzi.fr
// @author tzi
// @include http://*.labrute.fr/cellule
// @include http://*.labrute.fr/arene
// @grant none
// @version 2015.04.22
@tzi
tzi / border_image.js
Created September 5, 2011 09:24
A #javascript #function : Add border on image of the page, even in #iframe
// Fonction anonyme
(function (){
var border_image = function(win) {
// On essaye de récupérer le document à partir de la fenêtre
var doc
try {
doc = win.document;
} catch(e) {}
@tzi
tzi / alphabounceenhancer.user.js
Created September 8, 2011 17:25
A #javascript #userscript : Enhance the #Alphabounce Interface
// ==UserScript==
// @name AlphabounceEnhancer
// @namespace http://zilliox.me
// @description Improve the Alphabounce interface by adding the direction of the missions, the planets and the asteroids. This script also add a bloc-note.
// @include *.alphabounce.com/
// @include *.alphabounce.com/?*
// ==/UserScript==
(function () {
var $;
@tzi
tzi / gist:1351364
Created November 9, 2011 13:05
A #shell #script : recreate the #ezpublish back-office tree from the media files
# USAGE
usage()
{
echo "usage: $0 [ -v ] <storage> <destination>"
echo ""
echo " -v : Increase the verbose"
echo ""
exit
}
@tzi
tzi / index.html
Created November 9, 2011 22:16
A #javascript #function : Parse #SGF to #JSON
<html>
<head>
<title>Parse SGF to JSON in Javascript</title>
<script type="text/javascript" src="sgf.js"></script>
<script type="text/javascript">
window.onload = function() {
document.getElementById( 'form_sgf' ).onsubmit = function() {
parse_sgf( document.getElementById( 'textarea_sgf' ).value );
return false;
}
@tzi
tzi / custom-field-data.php
Created December 22, 2011 14:51
SugarCRM module layouts snippets
<?php
$viewdefs[ $module_name ][ 'EditView' ] = array(
// CONTENT
'panels' => array(
// PANEL
'lbl_panel_1' => array(
// ROW
@tzi
tzi / config.php
Created December 29, 2011 10:33
SugarCRM module miscellaneous snippets
<?php
$config = array (
'assignable' => true,
'acl' => true,
'has_tab' => true,
'studio' => true,
'audit' => true,
'templates' =>
@tzi
tzi / whatJS.js
Created December 29, 2011 13:21
A #javascript #bookmarklet : Find which javascript Framework is used on the current page
(function () {
if ( typeof( bm_popin ) == 'undefined' ) {
alert( 'Please update your Bookmarklet here: http://zilliox.me/bm' );
} else {
// Instanciate a generic bookmarklet popin
var popin = new bm_popin( 1534085 );
popin.title( 'What JS ?' );
var no_framework = true;
// jQuery : http://jquery.com/