Skip to content

Instantly share code, notes, and snippets.

View Plou's full-sized avatar

Plou Plou

View GitHub Profile
@Plou
Plou / codepen.link
Created August 12, 2013 14:33
Different ways of vertical and horizontal centering with css.
@Plou
Plou / giHub.link
Created August 12, 2013 12:36
A jQuery method to improve javascript's timeout. Allow to set interval, timeout, cancel them or execute them right away.
@Plou
Plou / image.ts
Created July 23, 2013 09:59
A way to display an alternate image in typoscript (work with in_documents)
ICON = IMAGE
ICON {
file.import.field = extension
file.import.wrap = typo3conf/ext/skin/template/extensions/in_documents/ico/|.gif
params = class="icon"
required = 1
}
@Plou
Plou / base.js
Created July 2, 2013 15:17
A JavaScript lib to make a list of items sliding pages & the flex content & flexform working with it. [wip] only 2 items per page working at the time
(function($) {
$.fn.slideshowTxtImg = function() {
var $screen = $(this),
$wrapper = $(this).find('.slideWrapper'),
$slides = $(this).find('.slideWrapper .item'),
slideWidth = parseFloat($screen.width()) *.47732,
slideMargin = parseFloat($screen.width()) *.04537,
wrapperWidth = (slideWidth + slideMargin) * $slides.length,
autoTimer = setInterval(function(){}),
@Plou
Plou / tca.php
Created June 27, 2013 14:08
Work in progress... Example of a tca file with text, rich text editor (rte), file (image), date, pages and database entry.
<?php
if (!defined ('TYPO3_MODE')) die ('Access denied.');
t3lib_extMgm::allowTableOnStandardPages('tx_indocuments_category');
$TCA['tx_indocuments_category'] = array (
'ctrl' => $TCA['tx_indocuments_category']['ctrl'],
'interface' => array (
'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,starttime,endtime,title, parent_category'
@Plou
Plou / github.link
Created June 25, 2013 14:05
A JavaScript Library to manage datetime format and localisation
@Plou
Plou / github.link
Created June 25, 2013 13:51
Allow to easely bind any key or shorcut to a callback function.
@Plou
Plou / index.html
Last active December 18, 2015 16:39
Responsive HTML/CSS samples & IE compatibility meta
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- force device to display the page without zooming out -->
<meta name="viewport" content="initial-scale=1">
@Plou
Plou / jQuery.serializeObject.js
Created June 19, 2013 06:46
serializeObject jQuery method
$.fn.serializeObject = function() {
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
} else {
@Plou
Plou / projectName.local.plou
Created June 18, 2013 21:23
a virtual host example, Access-Control-Allow-Origin set to allow any request from foreign domains
## projectName
<VirtualHost *:80>
ServerName projectName.local.plou
CustomLog "/www/.logs/projectName.local.plou-access_log" combined
ErrorLog "/www/.logs/projectName.local.plou-error_log"
DocumentRoot "/www/projectName/"
Header set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "POST, PUT, GET, DELETE, OPTIONS"
Header always set Access-Control-Allow-Headers "Content-Type"
</VirtualHost>