Skip to content

Instantly share code, notes, and snippets.

View AlexLo33's full-sized avatar

Alexandre Lorion AlexLo33

  • Bordeaux
View GitHub Profile
(() => {
'use strict';
let city = 'Bordeaux';
let age = '29 ans';
const dateOfBirth = '10 décembre 1988';
const string = `J'habite à ${city}, j'ai ${age} ans et je suis né le ${dateOfBirth}`;
console.log(string);
})();
(() => {
'use strict';
const profile = {
name: 'Alexandre',
getName() {
return this.name
}
};
(() => {
'use strict';
const address = {
city: "Lyon",
state: "FR",
zip: 69001
};
const listeSports = ['Football', 'BasketBall']
const autreListeSports = ['Boxe', 'Judo']
(() => {
'use script';
class Monster {
constructor(options = {}) {
this.health = 100;
this.name = options.name;
}
soigner() {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Javascripting</title>
</head>
<body>
onChange(files){
const f = files[0];
var reader = new FileReader();
reader.onload = (function(theFile) {
return function(e) {
const data = e.target.result;
const lines = data.split("\n");
const headers = lines[0].split(",");
lines.shift();
const result = [];
CREATE TABLE `movie` (
`id` int(11) NOT NULL,
`name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
`poster` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`comment` varchar(1500) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `movie` ADD PRIMARY KEY (`id`);
ALTER TABLE `movie` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
import React, { Component } from 'react';
import Webcam from 'react-webcam';
class Photo extends Component {
constructor(props) {
super(props);
this.webcam = React.createRef();
this.state = {
takePicture: false,
images: [],
import { combineReducers } from 'redux';
import { createStore } from 'redux';
// create reducer 1
const is1 = 0;
const red1 = (state = is1, action) => {
switch(action.type) {
default: return state;
}
};
import React from 'react';
import { Redirect, Route } from 'react-router-dom';
const PrivateRoute = ({ component: Component, token, ...propsRoute }) => (
<Route
{...propsRoute}
render={props => (
token !== ''
? <Component {...props} />
: (