This file contains hidden or 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 max = 20; | |
| var array = [10, 23, 5, 40, 19, 24]; | |
| var closest = array.filter(function(elem) { | |
| return elem >= max; | |
| }).sort().reverse().pop(); |
This file contains hidden or 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 jsons = require('require-dir')('./json'); | |
| console.log(jsons); |
This file contains hidden or 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 sleep(ms) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| }; |
This file contains hidden or 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 randomColor() { | |
| return '#' + Math.floor(Math.random() * 16777215).toString(16); | |
| } |
This file contains hidden or 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() { | |
| var movieLists = [ | |
| { | |
| name: "New Releases", | |
| videos: [ | |
| { | |
| "id": 70111470, | |
| "title": "Die Hard", | |
| "boxarts": [ | |
| { width: 150, height:200, url:"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg" }, |
This file contains hidden or 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'; | |
| var gulp = require('gulp'); | |
| var browserSync = require('browser-sync'); | |
| var nodemon = require('gulp-nodemon'); | |
| gulp.task('default', ['browser-sync'], function () { | |
| }); | |
| gulp.task('browser-sync', ['nodemon'], function() { |
This file contains hidden or 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
| { | |
| "name": "api", | |
| "version": "0.0.1", | |
| "description": "myAPI", | |
| "main": "./bin/www.js", | |
| "scripts": { | |
| "start": "node_modules/.bin/pm2 start dist/bin/www.js -i max", | |
| "serve": "nodemon src/bin/www.js --exec babel-node", | |
| "clean": "rm -rf dist/ && mkdir dist", | |
| "deploy-patch": "npm version patch && npm run deploy", |
This file contains hidden or 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
| <section class="bloc"> | |
| <div class="title"> | |
| <h1>Titre</h1> | |
| </div> | |
| <div class="content"> | |
| <div class="content-title"> | |
| titre content | |
| </div> | |
| <div class="button-container"> | |
| Some button |
This file contains hidden or 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
| // Create async function array | |
| const eFcts = ['f1', 'f2','f3'].map((url) => | |
| (err, cb) => | |
| setTimeout(() => { | |
| cb(err, 'async ' + url) | |
| }, 100) | |
| ); | |
| // Wraps runner to keep track of results | |
| const series = (pFcts, pDone) => { |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <div id="app"></div> | |
| <script src="https://fb.me/react-15.1.0.js"></script> |
OlderNewer