Skip to content

Instantly share code, notes, and snippets.

Avatar

Sebastien Paul πtt° sebastien-p

View GitHub Profile
View 1- Your snippet (callback style).js
promiseA.then(function (resultA) {
promiseB.then(function (resultB) {
object.method(arg1, arg2, function (resultC) {
console.log(resultC);
});
});
});
@sebastien-p
sebastien-p / cloudSettings
Last active Jul 8, 2019
Visual Studio Code Sync Settings Gist
View cloudSettings
{"lastUpload":"2019-07-08T12:27:47.781Z","extensionVersion":"v3.3.1"}
@sebastien-p
sebastien-p / naming.txt
Created Nov 5, 2013
CSS BEM-style naming conventions
View naming.txt
namespace-componentName
namespace-componentName--modifier
namespace-componentName__descendant
namespace-u-utilityName
namespace-a-animationName
namespace-s-stateName
namespace-j-jsHookName
//namespace-c-colorName?
//namespace-c-colorName--text?
View dabblet.css
body { background: #666 }
.flower,
.flower > *,
.flower > * > * {
-webkit-user-select: none;
display: block;
margin: 0;
padding: 0
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Infinite carousel using YMslider 1.0.8</title>
<link rel="stylesheet" href="jQuery.YMslider.core-min.css">
<link rel="stylesheet" href="jQuery.YMslider.default-min.css">
<link rel="stylesheet" href="jQuery.YMslider.infinite.css">
</head>
<body>
@sebastien-p
sebastien-p / main-min.js
Created Dec 18, 2011
jQuery (or Zepto) plugin AMD adapter
View main-min.js
;!function(a,b,c){typeof(c=this.define)=="function"&&c.amd?c(a,b):b(this[(c=/(^|[/!,])(jquery|zepto)(,|!|$)/.exec(a))&&(c[2]=="zepto"?"Zepto":"jQuery")])}(["jquery"],function($){return $});
@sebastien-p
sebastien-p / production.js
Created Sep 11, 2011
jQuery CORD plugin boilerplate
View production.js
/*!
* Copyright (c) 2011 Sebastien P.
* http://twitter.com/_sebastienp
* Licensed under the MIT license
*
* Wed Sep 14 2011 11:53:40 GMT+0200 (CEST)
*/
;!function (PLUGIN_NAME, WINDOW, DOCUMENT, TRUE, FALSE, NULL, UNDEFINED, $, PLUGIN_DEFAULTS, j) {
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Sebastien P. https://twitter.com/#!/_sebastienp
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Sebastien P. https://twitter.com/#!/_sebastienp
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@sebastien-p
sebastien-p / LICENSE.txt
Created Jun 25, 2011 — forked from 140bytes/LICENSE.txt
Array.prototype.reduceRight
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Sebastien P. https://twitter.com/#!/_sebastienp
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE