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
// two way to shorten an array | |
let s = '123456' | |
// reduce | |
// list => single num/string | |
let sum = [1, 2, 3, 4, 5].reduce((a, b) => a + b) | |
// list => a single num | |
let biggest = [...s].reduce((a, b) => Math.max(a, b)) | |
// filter |
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
.board { | |
display: flex; | |
width: 600px; | |
height: 600px; | |
flex-direction: row; | |
flex-wrap: wrap; | |
/* justify-content: flex-start; */ | |
} | |
.square { |
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
class Note extends React.Component { | |
constructor({age}) { | |
super() | |
// {age } = props.age | |
// this.age = {age} | |
this.age = {age} | |
} | |
componentDidMount(){ | |
} |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
header { | |
background: purple; |
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
/* eslint-disable */ | |
import prompt from 'prompt'; | |
import mkdirp from 'mkdirp'; | |
import moment from 'moment'; | |
import yaml from 'js-yaml'; | |
/* eslint-enable */ | |
import snakeCase from 'lodash/snakeCase'; | |
import fs from 'fs'; | |
prompt.start(); |
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
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import { | |
BrowserRouter as Router, | |
Route, | |
Switch | |
} from 'react-router-dom' |
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
import React from 'react'; | |
import moment from 'moment'; | |
import './Timer.css' | |
class Timer extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { |
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
" ============================================================================ | |
" ____ _ __ ___ _ | |
" / ___| ___ _ __ __ _( )___ \ \ / (_)_ __ ___ _ __ ___ | | | |
" \___ \ / _ \| '_ \ / _` |// __| \ \ / /| | '_ ` _ \| '__/ __| | | | |
" ___) | (_) | | | | (_| | \__ \ \ V / | | | | | | | | | (__ |_| | |
" |____/ \___/|_| |_|\__, | |___/ \_/ |_|_| |_| |_|_| \___| (_) | |
" |___/ | |
" ============================================================================ | |
" | |
" |
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
@-webkit-keyframes fadeIn { from { opacity:0; opacity: 1\9; /* IE9 only */ } to { opacity:1; } } | |
@-moz-keyframes fadeIn { from { opacity:0; opacity: 1\9; /* IE9 only */ } to { opacity:1; } } | |
@keyframes fadeIn { from { opacity:0; opacity: 1\9; /* IE9 only */ } to { opacity:1; } } | |
.fade-in { | |
opacity:0; /* make things invisible upon start */ | |
-webkit-animation:fadeIn ease-in-out 1; /* call our keyframe named fadeIn, use animattion ease-in and repeat it only 1 time */ | |
-moz-animation:fadeIn ease-in-out 1; | |
animation:fadeIn ease-in-out 1; |
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
# in case tmux not working again | |
# sudo sysctl -w kern.tty.ptmx_max=256 |