Skip to content

Instantly share code, notes, and snippets.

Nicolas Carlo nicoespeon

Block or report user

Report or block nicoespeon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nicoespeon
nicoespeon / dabblet.css
Created Apr 11, 2013
dabblet use example
View dabblet.css
.block {
text-align: justify;
background-color: #DDD;
border: 2px black solid;
border-radius: 10px;
}
.lightbox {
width: 90px;
@nicoespeon
nicoespeon / compressor.rb
Last active Dec 16, 2015 — forked from mytharcher/compressor.rb
A jekyll plugin for compressing HTML, JavaScript files when rendering.
View compressor.rb
#
# File compressor plugin for jekyll
# =================================
#
# By [mytharcher](https://github.com/mytharcher)
# 2012-05-20
#
# Updated by [nicoespeon](https://github.com/nicoespeon)
# 2013-04-12
#
View dabblet.css
@-keyframes reveal {
0% {
left: 0;
}
100% {
left: 100%;
}
}
.container {
position: relative;
View side-effects-fp.js
/**
* Tu ne peux pas ne pas avoir d’effets de bord, sinon il ne se passe absolument rien.
*
* En revanche, la prog fonctionnelle préconise de limiter ça au maximum.
*
* Du coup c’est possible de le faire, mais généralement l’effet de bord qui log est isolé à un seul endroit (= une fonction impure).
*
* Il est assez simple de transformer une fonction impure en fonction pure : il suffit de l’englober dans une closure.
**/
function impure$ () {
@nicoespeon
nicoespeon / behavior.js
Last active Mar 23, 2016
Blog - Testing Marionette.js Behaviors - problem
View behavior.js
const Alert = Marionette.Behavior.extend( {
defaults: {
title: "Alert!",
message: "Not really urgent"
},
events: {
"click": "emitAlert"
},
@nicoespeon
nicoespeon / plopfile.js
Last active Mar 23, 2016
Blog - Plop — a micro-generator to ease your daily life - adapt actions to answers
View plopfile.js
module.exports = ( plop ) => {
plop.setGenerator( "module", {
prompts: [
{
type: "input",
name: "name",
message: "What is the name of your module?",
validate: isNotEmptyFor( "name" ),
@nicoespeon
nicoespeon / calendars.js
Last active Mar 23, 2016
Blog - Plop — a micro-generator to ease your daily life - calendars parsed
View calendars.js
import Module from "core/module";
import _ from "lodash";
// IMPORT MODULE FILES
import Model from "./calendars.model";
const namespace = "calendars";
Model = Model.extend( { namespace: namespace } );
@nicoespeon
nicoespeon / calendars.js
Last active Mar 23, 2016
Blog - Plop — a micro-generator to ease your daily life - calendars
View calendars.js
import Module from "core/module";
import _ from "lodash";
// IMPORT MODULE FILES
const namespace = "calendars";
export default Module.extend( {
initialize() {
@nicoespeon
nicoespeon / calendars.model.js
Last active Mar 23, 2016
Blog - Plop — a micro-generator to ease your daily life - calendars.model result
View calendars.model.js
/**
* TODO - Describe what your model does.
*
* @class Calendars.Model
* @module Calendars
* @constructor
*/
import {Model} from "backbone";
export default Model.extend( {
@nicoespeon
nicoespeon / model.js
Last active Mar 23, 2016
Blog - Plop — a micro-generator to ease your daily life - plop-template
View model.js
/**
* TODO - Describe what your model does.
*
* @class {{pascalCase name}}.Model
* @module {{pascalCase name}}
* @constructor
*/
import {Model} from "backbone";
export default Model.extend( {
You can’t perform that action at this time.