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
| killhard () { | |
| ps -e | grep $1 | awk '{print $1}' | |
| # For some reason there is no collision between the two $1 ... | |
| kill -9 $(ps -e | grep $1 | awk '{print $1}') | |
| } |
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
| echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf ; sudo sysctl -p |
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
Show hidden characters
| { | |
| "presets": ["es2015", "react"] | |
| } |
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
| const CounterUi = ({value, increment, decrement}) => ( | |
| <div> | |
| <p> | |
| Counter : {value} | |
| </p> | |
| <div> | |
| <button onClick={increment}>+</button> | |
| <button onClick={decrement}>-</button> | |
| </div> | |
| </div> |
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
| const arr = [{"toto": 1, "tata": 4}, {"titi": 0}]; | |
| const res = arr.reduce((acc, e) => Array.prototype.concat(acc, Object.keys(e)), []); | |
| console.log(res); // outputs: ["toto", "foo", "titi"] |
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'; | |
| import cluster from 'cluster'; | |
| import os from 'os'; | |
| const numCPUs = os.cpus().length; | |
| const stopSignals = [ | |
| 'SIGHUP', 'SIGINT', 'SIGQUIT', 'SIGILL', 'SIGTRAP', 'SIGABRT', | |
| 'SIGBUS', 'SIGFPE', 'SIGUSR1', 'SIGSEGV', 'SIGUSR2', 'SIGTERM' | |
| ]; | |
| const production = process.env.NODE_ENV == 'production'; |
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
| [push] | |
| default = simple | |
| [alias] | |
| tree = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
| co = checkout | |
| ci = commit | |
| st = status | |
| br = branch | |
| hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short |
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> |
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
| <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 |