Skip to content

Instantly share code, notes, and snippets.

View kena0ki's full-sized avatar
🐢

Ken Aoki kena0ki

🐢
View GitHub Profile
@kena0ki
kena0ki / .gvimrc
Last active August 11, 2017 09:53
gvimrc
colorscheme slate
set lines=55
set columns=180
set clipboard=unnamedplus
@kena0ki
kena0ki / Dockerfile
Last active August 11, 2017 16:54
Recipe for React(from eclipse/stack-base:debian)
FROM eclipse/stack-base:debian
RUN sudo apt-get update && \
sudo apt-get -y install build-essential libssl-dev libkrb5-dev gcc make ruby-full rubygems debian-keyring python2.7 && \
sudo gem install sass compass && \
sudo apt-get clean && \
sudo apt-get -y autoremove && \
sudo apt-get -y clean && \
sudo rm -rf /var/lib/apt/lists/*
@kena0ki
kena0ki / Dockerfile
Created August 11, 2017 16:53
Recipe for React(from eclipse/node)
FROM eclipse/node
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
RUN sudo apt update && sudo apt -y install yarn
RUN sudo yarn global add create-react-app
'use strict';
const autoprefixer = require('autoprefixer');
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const eslintFormatter = require('react-dev-utils/eslintFormatter');
'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');
@kena0ki
kena0ki / delayed-cat.js
Last active November 11, 2019 14:54
reads and displays stdin line by line without using @@asyncIterator
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);
# 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
@kena0ki
kena0ki / memo.txt
Last active December 19, 2019 07:55
https://deploy-preview-3342--slatejs.netlify.com/examples/richtext
@kena0ki
kena0ki / .vimrc
Last active March 28, 2020 12:38
" 一旦ファイルタイプ関連を無効化する
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'
@kena0ki
kena0ki / golang.sh
Last active January 12, 2020 08:22
Golang environment variable for Centos (path: /etc/profile.d/golang.sh)
[[ ! "$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"