Navigation Menu

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 / 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 / en_us.lang.php
Created December 16, 2011 14:33
SugarCRM module fields definition snippets
<?php
$app_list_strings['my_select_options']['value_1'] = 'Label 1';
$app_list_strings['my_select_options']['value_2'] = 'Label 2';
$app_list_strings['my_select_options']['value_3'] = 'Label 3';
?>
@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/
@tzi
tzi / index.html
Created January 13, 2012 16:48
PrintPreview
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>PrintPreview - A bookmarklet to preview the print version of a web page</title>
<meta name="viewport" content="initial-scale=1.0">
<link rel="stylesheet" href="style.css" >
</head>
<body>
<h1>PrintPreview</h1>
@tzi
tzi / quick_rapidshare.js
Created February 15, 2012 19:36
A #javascript #bookmarklet : Automatically launch download on #RapidShare
(function() {
// Instanciate a generic bookmarklet popin
var popin = new bm_popin( 1838395 );
popin.title( 'Quick RapidShare' );
// Inspect if timer is finish
var interval_id;
var inspect_rapidshare_timer = function() {
var rapidshare_timer = document.querySelector('#js_dlpage_freetimer_container');