Skip to content

Instantly share code, notes, and snippets.

/*
*
* Garber-Irish Implementation :
* http://viget.com/inspire/extending-paul-irishs-comprehensive-dom-ready-execution
* http://www.diegolago.co.uk/development/organise-your-javascript-and-make-your-life-easier/
*
* Modif pour se baser sur X element dans la page et non sur le body
* http://techblog.treenodes.com/index.php/2012/04/19/organize-javascript-and-jquery-events-dom-ready-execution/
*
* plus simple, mais dans le même esprit :
/*
This javascript is the main javascript for the sites actions.
*/
// --------------------------------------------------------------------------------------------------------------
// set up a master object
var UI_NAMESPACE = window.UI_NAMESPACE || {};
@ethyde
ethyde / link-state-order.less
Created September 30, 2014 12:19
ordre des états d'un lien
@ethyde
ethyde / section-block
Created September 30, 2014 12:20
Comment snippets for Sublime Text 2
<snippet>
<content><![CDATA[
/* =========================================================================
${1:section-comment-block-name}
========================================================================= */
${0}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>scb</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
// BAD
var name = 'Jeffrey';
var lastName = 'Way';
function doSomething() {
// do something
}
console.log(name); // Jeffrey -- or window.name
// BETTER
@ethyde
ethyde / simple-google-map-plugin.html
Last active August 29, 2015 14:07
Very simple google map plugin
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TEST API Google Map</title>
<style>
html, body, #map-canvas {
background: blue;
height: 100%;
width: 100%;
@ethyde
ethyde / youtube-playlist.html
Last active August 29, 2015 14:07
Youtube playslist - Jquery plugin
<div class="playlist clearfix" data-playlist="PLO9aNMUaQmH9Hdhq5ICGHOC6zrjJ0NQID"></div>
<div class="playlist clearfix" data-playlist="PLliN_STKLPP2_aiUEeewQA-R8GuS9o-25"></div>
$('.playlist').youtubePlaylist();
# -----------------------------------------------------------------------
# Defining MIME types to ensure the web server actually knows about them.
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
# | Proper MIME types for all files |
# -----------------------------------------------------------------------
<IfModule mod_mime.c>
# Audio
<a id="foo"
href="#"
data-str="bar"
data-bool="true"
data-num="15"
data-json='{"id":"2", "fizz":["buzz", "pariatur", "esse", "cillum"], "lat":"48.861395", "lon":"2.35136", "title":"Paris", "number" : 12584, "bool": true}'
data-json2='{"id":"3", "fizz":[{"id": 0, "name": "Imelda Dalton"},{"id": 1,"name": "Kayla Padilla"}], "lat":"48.861395", "lon":"2.35136", "title":"Paris"}'>foo!</a>
@ethyde
ethyde / font-face.less
Last active August 29, 2015 14:07
Less mixins
.font-face(@fontname, @fontfile, @fontweight:normal, @fontstyle:normal) {
font-family: "@{fontname}";
src: url("@{fontfile}.eot");
src: url("@{fontfile}.eot?#iefix") format("embedded-opentype"),
url("@{fontfile}.woff") format("woff"),
url("@{fontfile}.ttf") format("truetype"),
url("@{fontfile}.svg#@{fontname}") format("svg");
font-weight: @fontweight;
font-style: @fontstyle;
}