This file contains hidden or 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
| function flatten(array) { | |
| return array.reduce( | |
| (a, b) => a.concat(b instanceof Array ? flatten(b) : b), | |
| [] | |
| ); | |
| } |
This file contains hidden or 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
| call plug#begin('~/.vim/plugged') | |
| Plug 'tpope/vim-sensible' | |
| Plug 'sheerun/vim-polyglot' | |
| Plug 'ctrlpvim/ctrlp.vim' | |
| Plug 'scrooloose/nerdtree' | |
| Plug 'Xuyuanp/nerdtree-git-plugin' | |
| Plug 'airblade/vim-gitgutter' | |
| Plug 'w0rp/ale' | |
| Plug 'vim-airline/vim-airline' |
This file contains hidden or 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 ALL_POSTS = graphql` | |
| query($orderBy: PostOrderBy) { | |
| allPosts(orderBy: $orderBy) { | |
| title | |
| content | |
| createdAt | |
| updatedAt | |
| } | |
| } | |
| `; |
This file contains hidden or 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"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>webcomponents test</title> | |
| <style> | |
| body { | |
| margin: 0; |
This file contains hidden or 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
| atom sync |
This file contains hidden or 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
| 'use strict' | |
| const http = require('http'), | |
| fs = require('fs') | |
| let i = 0, | |
| url = 'http://thecatapi.com/api/images/get?format=src&type=jpg' | |
| function request(url) { |