This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For more details, see : | |
SMACCS and Fifty Shades of BEM (http://blog.kaelig.fr/post/48196348743/fifty-shades-of-bem) | |
prefix-ComponentName | |
prefix-ComponentName-MODIFIERNAME | |
prefix-ComponentName-subObject | |
prefix-ComponentName-subObject-MODIFIERNAME | |
p- Page specific (class applied on the body element), very useful for static pages where maintainability is not at stake — should be avoided in the application itself (e.g.: p-Homepage). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function RandomClassesDivs(){ | |
// declare classes we want to apply | |
var bubbleColors = ['bubble_color_1', 'bubble_color_2', 'bubble_color_3', 'bubble_color_4', 'bubble_color_5', 'bubble_color_6']; | |
var bubbleSizes = ['bubble_1', 'bubble_2', 'bubble_3', 'bubble_4', 'bubble_5']; | |
//find the highest key of the classes arrays | |
var nbrSizes = (bubbleSizes.length) - 1, | |
nbrColors = (bubbleColors.length) - 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dpkg-reconfigure resolvconf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function valueToPlaceHolder(divId){ | |
// this function creates a placeholder based on the attribute 'value' of this same input text field | |
//once done, it removes the 'value' attribute | |
// it is useful for cforms II plugin cos placholder are not available, while default value attr are | |
// THIS : | |
// <input xxx value="Prénom - First name" xxx> | |
// would return : | |
// <input xxx placeholder="Prénom - First name" xxx> | |
// see http://stackoverflow.com/questions/11432144/change-value-to-placeholder-input-field | |
if( document.getElementById(divId) ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var keystone = require('keystone'); | |
var Types = keystone.Field.Types; | |
/** | |
* Page Model | |
* ========== | |
*/ | |
var Page = new keystone.List('Page', { | |
map: { name: 'title' }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$dir = dirname(__FILE__); | |
echo "<p>Full path to this dir: " . $dir . "</p>"; | |
echo "<p>Full path to a .htpasswd file in this dir: " . $dir . "/.htpasswd" . "</p>"; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Show 1000 rows instead of 30 by default | |
$cfg['MaxRows'] = 1000; | |
# Show BLOB data as a string not hex. | |
$cfg['DisplayBinaryAsHex'] = false; | |
# Show BLOB data in row detail pages. | |
$cfg['ProtectBinary'] = false; | |
# Show BLOB data on table browse pages. Hack to hardcode all requests. | |
$_REQUEST['display_blob'] = true; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=DROITE(CELLULE("nomfichier");NBCAR(CELLULE("nomfichier"))-TROUVE("]";CELLULE("nomfichier"))) | |
B24 =CELLULE("nomfichier";A1) => F:\Dropbox\folder\folder\folder\[workbook.xlsx]worksheet | |
B25 =TROUVE("]";$B$24) => 47 | |
B26 =NBCAR(B24) =>56 | |
B27 =B26-B25 => 9 | |
B28 =DROITE($B$24;$B$27) => worksheet | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adds a class togClass (ex:'active') to anchor links within a page that are within an element with and id of id | |
* @param {id} id(without #) The id of the div in wich the anchors are embeded | |
* @param {togClass} class (without .) The class we want to toggle | |
* @return {nothing} | |
*/ | |
function activeAnchor(id, togClass){ | |
$('#' + id + ' a[href^="' + location.hash + '"]').addClass(togClass); | |
$(window).bind('hashchange', function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
jshint: { | |
options: { | |
jshintrc: '.jshintrc' | |
}, | |
all: [ |