npm install --global serve ngrok
serve
ngrok http 5000
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 json2str = (target) => { | |
switch (typeof target) { | |
case 'number': | |
return isNaN(target) ? 'null' : target.toString() | |
case 'boolean': | |
return target.toString() | |
case 'string': | |
return `"${target}"` | |
case 'object': | |
if (target === null) { |
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
// https://adventofcode.com/2018/day/8 | |
// https://jsfiddle.net/keipixel/fuyhq4az/ | |
const data = '2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2' | |
// { | |
// meta: [1, 1, 2], | |
// children: [ | |
// { | |
// meta: [10, 11, 12], | |
// children: [] |
Working in Kyoto
Explain how each css property related to line breaking works.
Video & Slide: https://www.dotconferences.com/2018/11/florian-rivoal-line-breaking
Map | Action |
---|---|
<F1> | Causes Netrw to issue help |
<cr> | Netrw will enter the directory or read the file |
<del> | Netrw will attempt to remove the file/directory |
- | Makes Netrw go up one directory |
a | Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide) |
c | Make browsing directory the current directory |
C | Setting the editing window |
d | Make a directory |
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
@font-face { | |
font-family: "Hiragino Sans"; | |
src: local(HiraginoSans-W0); | |
font-weight: 100; | |
} | |
@font-face { | |
font-family: "Hiragino Sans"; | |
src: local(HiraginoSans-W1); | |
font-weight: 200; | |
} |
$ git remote add theirusername [email protected]:theirusername/reponame.git
$ git fetch theirusername
$ git checkout -b mynamefortheirbranch theirusername/theirbranch
principle:
- always show the first and the lastest page
- show two preview pages and two next pages of current page
<= 8
1 2 3 4 5 6 7 8
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
// parse search query | |
const params = new URLSearchParams('?a=b'); | |
params.get('a') | |
// querySelector with attribute | |
document.querySelector('div:not([data-role="head"])') | |
// online matrix | |
const matrix = new Array(10).fill(0).map((v, i) => (new Array(10).fill(0).map((vv, ii) => `r${i}c${ii}`))) |
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 s = 'abcde' | |
// s.substr(1/*start*/, 3/*count*/) // bcd | |
s.substring(1/*start*/, 3/*end(not included)*/) // bc, not changed | |
s.slice(1/*start*/, 3/*end(not included)*/) // bc, not changed | |
s.slice(1,3) === s.substring(1,3) | |
var a = ["a", "b", "c", "d", "e"] | |
a.slice(1/*start*/, 3/*end(not included)*/) // ['b', 'c'], not changed |