Skip to content

Instantly share code, notes, and snippets.

View Plou's full-sized avatar

Plou Plou

View GitHub Profile
@Plou
Plou / Default (Linux).sublime-keymap
Last active December 14, 2015 18:19
Sublime-Text 3 Base Configuration
[
// Emmet broke those
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["ctrl+z"], "command": "undo" },
{ "keys": ["ctrl+u"], "command": "soft_undo" },
{ "keys": ["ctrl+shift+u"], "command": "soft_redo" },
// switch "redo_or_repeat" & "redo" shortcuts
{ "keys": ["ctrl+shift+z"], "command": "redo_or_repeat" },
{ "keys": ["ctrl+y"], "command": "redo" },
@Plou
Plou / Lessc.sublime-build
Last active December 14, 2015 18:58
Build system for less files in sublime-text
{
"cmd": ["lessc", "styles.less", "$file_path/styles.css", "-x"],
"working_dir": "$file_path",
"selector": "source.css.less",
"path": "/home/plou/.nvm/v0.10.4/bin/",
"variants": [
{
"name": "Run",
"cmd": ["lessc", "$file_name", "$file_path/$file_base_name.css", "-x --no-color"],
"working_dir": "$file_path",
@Plou
Plou / component.js
Created April 16, 2013 14:40
RequireJs use
{
"name": "euralille",
"version": "0.0.0",
"dependencies": {
"jquery": "1.9.1",
"requirejs": "2.1.5",
"underscore": "1.4.4",
"modernizr": "2.6.2"
},
"devDependencies": {}
@Plou
Plou / coa.sublime-snippet
Last active December 16, 2015 14:49
Typoscript Snippets
<snippet>
<content><![CDATA[
${1:10} = COA
$1 {$7${2:
${3:10} = ${4:TEXT}
$3 {
$5
}}$6
}
]]></content>
@Plou
Plou / parameters.yml
Created April 29, 2013 06:45 — forked from anonymous/parameters.yml
git ignored files of conf from Symfony2
parameters:
database_driver: pdo_mysql
database_host: localhost
database_port: ~
database_name: -
database_user: -
database_password: -
mailer_transport: smtp
mailer_host: localhost
@Plou
Plou / video.html
Created June 13, 2013 12:16
Html video tag & javascript to access it.
<video id="player" preload="auto" controls autoplay poster="img/thumb.jpg">
<source src="http://www.nicolas-hoffmann.net/animations/Cavernae_Terragen2.mp4" type="video/mp4" />
<source src="http://www.nicolas-hoffmann.net/animations/Cavernae_Terragen2.webm" type="video/webm" />
<source src="http://www.nicolas-hoffmann.net/animations/Cavernae_Terragen2.theora.ogv" type="video/ogg" />
Alternate content
</video>
@Plou
Plou / content.ts
Created June 13, 2013 13:11
Use multiple item flexform in flex using wec_content_element API
tt_content.flex = COA
tt_content.flex {
# render a field from the flexform
10 = TEXT
10 {
data = t3datastructure : pi_flexform->titleField
}
# output each image in the flex.
20 = FFSECTION
@Plou
Plou / date.xml
Created June 13, 2013 13:53
Example of a flexform with text, rich text editor (rte), file (image), date and multiple items (flexform sections)
<dateName>
<TCEforms>
<label>LLL:EXT:skinFlex/flex/locallang.xml:flexform.flex.dateName</label>
<config>
<type>input</type>
<eval>date</eval>
</config>
</TCEforms>
</dateName>
@Plou
Plou / triangle.css
Last active December 18, 2015 11:09
CSS styles to create an arrow with borders on a pseudo element (work with any empty tag)
/* triangle down */
div::after {
content: ' ';
position: absolute;
left: 125px;
bottom: -10px;
border: 10px solid @color;
border-bottom: 0;
border-left-color: transparent;
border-right-color: transparent;
@Plou
Plou / getHash.js
Created June 13, 2013 16:17
Javacript code to get the hash from an url (given or current)
$.getHash = function(url){
return url ? url.substring(url.indexOf('#')+1) : window.location.hash;
}