Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍🎓
enseigner les CSS

Thomas ZILLIOX tzi

👨‍🎓
enseigner les CSS
View GitHub Profile
@tzi
tzi / border_image.js
Created Sep 5, 2011
A #javascript #function : Add border on image of the page, even in #iframe
View border_image.js
// 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 Sep 8, 2011
A #javascript #userscript : Enhance the #Alphabounce Interface
View alphabounceenhancer.user.js
// ==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 Nov 9, 2011
A #shell #script : recreate the #ezpublish back-office tree from the media files
View gist:1351364
# USAGE
usage()
{
echo "usage: $0 [ -v ] <storage> <destination>"
echo ""
echo " -v : Increase the verbose"
echo ""
exit
}
@tzi
tzi / index.html
Created Nov 9, 2011
A #javascript #function : Parse #SGF to #JSON
View index.html
<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 Dec 16, 2011
SugarCRM module fields definition snippets
View en_us.lang.php
<?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 Dec 22, 2011
SugarCRM module layouts snippets
View custom-field-data.php
<?php
$viewdefs[ $module_name ][ 'EditView' ] = array(
// CONTENT
'panels' => array(
// PANEL
'lbl_panel_1' => array(
// ROW
@tzi
tzi / config.php
Created Dec 29, 2011
SugarCRM module miscellaneous snippets
View config.php
<?php
$config = array (
'assignable' => true,
'acl' => true,
'has_tab' => true,
'studio' => true,
'audit' => true,
'templates' =>
@tzi
tzi / whatJS.js
Created Dec 29, 2011
A #javascript #bookmarklet : Find which javascript Framework is used on the current page
View whatJS.js
(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 Jan 13, 2012
PrintPreview
View index.html
<!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 Feb 15, 2012
A #javascript #bookmarklet : Automatically launch download on #RapidShare
View quick_rapidshare.js
(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');