This file contains 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
# Copy that in ~/.bash_profile | |
# Call "proxy on|off|status" in your shell | |
proxy(){ | |
case $1 in | |
on) | |
export http_proxy=http://cache.etu.univ-nantes.fr:3128 | |
export https_proxy=https://cache.etu.univ-nantes.fr:3128 | |
sed -ie 's/false/true/g' ~/.m2/settings.xml | |
git config --global http.proxy http://NUM_ETUDIANT:MDP_ETUDIANT@cache.etu.univ-nantes.fr:3128 |
This file contains 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
// Single async all | |
$.when(myFunction) | |
.then(followingFunction); | |
// Multiple async call | |
var promises = [ myFunction(), myFunction() ] | |
$.when(myFunction) | |
.apply($, promises) | |
.then(followingFunction); |
This file contains 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> | |
<title>React</title> | |
</head> | |
<body> | |
<script src="https://unpkg.com/react@16.2.0/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16.2.0/umd/react-dom.development.js"></script> | |
<script src="https://unpkg.com/babel-standalone@6.24.2/babel.min.js" charset="utf-8"></script> | |
<script src="https://unpkg.com/fetch@1.1.0/lib/fetch.js" charset="utf-8"></script> |
This file contains 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 browserify = require('browserify'); | |
var source = require('vinyl-source-stream'); | |
var nodeResolve = require('resolve'); | |
/** | |
* Make a browserify bundle | |
* @param isAppBundle true to bundle application without dependencies, false to bundle dependencies only | |
* @returns {*} browserify bundle | |
*/ | |
var makeBundle = function (isAppBundle) { |
This file contains 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
#language: fr | |
@BadPractice | |
Fonctionnalité: Parcours de recherche d'une annonce voiture | |
Scénario: Recherche d'une annonce de voiture récente | |
Etant donné je ne suis pas identifié | |
Et je suis sur la page "accueil" | |
# Mieux que: je clique sur le champ ayant l'id "Pdl" | |
Quand je clique sur "Pays de la Loire" |
This file contains 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 DatePicker = (props) => <input type="date" onChange={props.handleDateSelected}/> | |
class DatePickerController extends React.Component { | |
constructor (props) { | |
super(props); | |
this.state = { currentDate: null }; | |
this.handleDateSelected = this.handleDateSelected.bind(this); | |
} | |
handleDateSelected ({target}) { |
This file contains 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
<!-- Skipping all HTML5 boilerplate --> | |
<script src="https://unpkg.com/react@16.2.0/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16.2.0/umd/react-dom.development.js"></script> | |
<!-- For JSX support (with babel) --> | |
<script src="https://unpkg.com/babel-standalone@6.24.2/babel.min.js" charset="utf-8"></script> | |
<div id="app"></div> <!-- React mounting point--> | |
<script type="text/babel"> |
This file contains 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
// React.createElement naive implementation (using ES6 features) | |
function createElement(type, props, ...children) { | |
return { type, props, children }; | |
} |
This file contains 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 Watch = (props) => | |
<div>{props.hours}:{props.minutes}</div>; | |
ReactDOM.render(<Watch hours="Hello" minutes="World"/>, document.getElementById('app')); |
This file contains 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
// Using JS with React.createElement | |
React.createElement('form', null, | |
React.createElement('div', {'className': 'form-group'}, | |
React.createElement('label', {'htmlFor': 'email'}, 'Email address'), | |
React.createElement('input', {'type': 'email', 'id': 'email', 'className': 'form-control'}), | |
), | |
React.createElement('button', {'type': 'submit', 'className': 'btn btn-primary'}, 'Submit') | |
) | |
// Using JSX |
OlderNewer