View eslint_rc_settings.txt
{ | |
"extends": [ | |
"airbnb", | |
"prettier", | |
"prettier/react", | |
"plugin:jsx-a11y/recommended" | |
], | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaVersion": 8, |
View vscode_settings.txt
{ | |
"editor.fontSize": 18, | |
"workbench.iconTheme": "material-icon-theme", | |
"explorer.compactFolders": false, | |
"explorer.confirmDragAndDrop": false, | |
"terminal.integrated.fontSize": 18, | |
"editor.tabSize": 2, | |
"[javascript]": { | |
"editor.tabSize": 2, | |
"editor.insertSpaces": true, |
View prettier_eslint.txt
exec 3<&1;bash <&3 <(curl https://raw.githubusercontent.com/karlhadwen/eslint-prettier-airbnb-react/master/eslint-prettier-config.sh 2> /dev/null) |
View ReactJS_1
handleClick = () => { | |
this.setState((prevState, prevProps) => { | |
return {meaningOfLife: prevState.meaningOfLife + 1}, | |
() => console.log(this.state.meaningOfLife) | |
}) | |
} |
View app.js
//A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N. | |
const toBinaryString = number => { | |
return number.toString(2); // returns a string | |
}; | |
function solution(N) { | |
const nBinaryString = toBinaryString(N); | |
let numberOfZeroes = 0; | |
let max = 0; | |
// loop through letters |
View index.html
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Form Styling</title> | |
<link | |
href="https://fonts.googleapis.com/css?family=Raleway" | |
rel="stylesheet" |
View es6_javascript_snippet.js
function shipmentES6({ items = 'bananas', number = 5, package = 'boxes' } = {}) { | |
console.log(`We have a shipment of ${items} in ${number} ${package}.`); | |
}; | |
shipmentES6({ package: 'crates' }); | |
// -> We have a shipment of bananas in 5 crates. | |
shipmentES6({ items: 'tomatoes', number: 18 }); | |
// -> We have a shipment of tomatoes in 18 boxes. | |
shipmentES6(); | |
// -> We have a shipment of bananas in 5 boxes. |
View java_apps2_Animal.java
package com.skiabox.java_apps2; | |
/** | |
* Created by administrator on 09/10/2016. | |
*/ | |
public abstract class Animal { | |
private String picture; | |
private Food food; | |
private int hunger; |
View webpack.config.js
var path = require('path'); | |
var webpack = require('webpack'); | |
module.exports = { | |
entry: './src/js/app.ts', | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: 'bundle.js', | |
publicPath: '/dist' |
View index.html
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Webpack 3 with Typescript</title> | |
</head> | |
<body> |
NewerOlder