- Command Line Applications in Rust
https://rust-cli.github.io/book/index.html - Rust Cookbook
https://rust-lang-nursery.github.io/rust-cookbook/intro.html - The Rust RFC Book
https://rust-lang.github.io/rfcs/introduction.html - The Rust Reference
https://doc.rust-lang.org/reference/introduction.html - The Cargo Book
https://doc.rust-lang.org/cargo/
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
'use strict' | |
function MyClass() { | |
function fnc() { | |
console.log(this, 'in fnc'); | |
} | |
const arrow = () => { | |
console.log(this, 'in arrow'); | |
} | |
const bind = function() { |
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
#!/bin/bash -eu | |
#https://www.vim.org/git.php | |
echo -n "Input work directory (default to home) >> " | |
read WORKDIR | |
echo | |
test -z "$WORKDIR" && WORKDIR=~ | |
test ! -e "$WORKDIR" && mkdir "$WORKDIR" | |
LOGFILE="$PWD/$WORKDIR"/vim/viminstall.log |
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
[[ ! "$PATH" =~ "/usr/local/go/bin" ]] && export PATH="$PATH:/usr/local/go/bin" | |
[[ -z "$GOPATH" ]] && export GOPATH="$HOME/go" | |
[[ ! "$PATH" =~ "$GOPATH/bin" ]] && export PATH="$PATH:$GOPATH/bin" |
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
" 一旦ファイルタイプ関連を無効化する | |
filetype off | |
" -------------------- | |
" Plugin | |
" -------------------- | |
" プラグインが実際にインストールされるディレクトリ | |
let s:dein_dir = expand('~/.vim') | |
" dein.vim 本体 | |
let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim' |
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://deploy-preview-3342--slatejs.netlify.com/examples/richtext |
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://help.github.com/en/github/getting-started-with-github/fork-a-repo | |
# https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork | |
FORKREPO="$1" | |
ORIGINREPO="$2" | |
WORKDIR="$3" | |
git clone "$FORKREPO" "$WORKDIR" # clone forked repo | |
cd "$WORKDIR" | |
git remote -v # confirm current configuration |
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 rl = require('readline').createInterface({ input: process.stdin }); | |
const first = { promise: Promise.resolve(), next: null }; | |
const queue = [first]; | |
function asyncReadLine(event, asyncCallback){ | |
rl.on(event, async (...args) => { | |
queue.push({ promise: new Promise(resolve => void (queue[queue.length - 1].next = resolve)), next: null }); | |
const promiseObj = queue.shift(); | |
await promiseObj.promise; | |
await asyncCallback(...args); |
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
'use strict'; | |
const autoprefixer = require('autoprefixer'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
const HtmlWebpackPlugin = require('html-webpack-plugin'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const ManifestPlugin = require('webpack-manifest-plugin'); | |
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); | |
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin'); |
NewerOlder