Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Shingo Inoue Leko

🏠
Working from home
Block or report user

Report or block Leko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View README.md
$ ./wait-for-url.sh localhost:12345
@Leko
Leko / peco_monorepo.sh
Created Feb 11, 2019
Search and change directory with peco in monorepo
View peco_monorepo.sh
peco_monorepo() {
local module_paths=($(node -e 'console.log(module.paths.join(" "))'))
local found=0
for module_paths in ${module_paths[@]}
do
local lerna_bin="$module_paths/.bin/lerna"
if [ ! -f $lerna_bin ]; then
continue
fi
View index.js
const licenses = require('./licenses.json')
const osiApprovedLicenses = licenses.filter(l => l.keywords.includes('osi-approved'))
@Leko
Leko / README.md
Created Nov 3, 2018
DO NOT USE IN PRODUCTION. It can only use for tests.
View README.md
import assert from './assert'
import { runInTimezone } from './runInTimezone'

const offset = await runInTimezone('Asia/Tokyo', () => new Date().getTimezoneOffset())
assert.strictEquals(offset, -540)
View ink-multiline-progress.js
// @flow
import { h, render, Text, Fragment, Component } from "ink";
import Spinner from "ink-spinner";
import chalk from "chalk";
import emoji from "node-emoji";
import { Provider, connect } from "ink-redux";
import { createStore } from "redux";
const Line = ({ text }) => (
<div>
@Leko
Leko / Dockerfile
Created Apr 29, 2018
Run Jupyter notebook with Keras for CPU only arch (ex. MacOS)
View Dockerfile
ARG cuda_version=9.0
ARG cudnn_version=7
FROM debian:stretch
# Install system packages
RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2 \
g++ \
git \
graphviz \
@Leko
Leko / dining-philosophers.js
Created Feb 28, 2018
The dining philosophers implementation of Node.js
View dining-philosophers.js
/**
* The dining philosophers implementation of Node.js
*
* See also:
* http://rust-lang-ja.github.io/the-rust-programming-language-ja/1.6/book/dining-philosophers.html
*
* (c) 2018 Leko
*/
const cluster = require('cluster')
View DDD+validate.js
class Avatar {
constructor (uri) {
this.setUri(uri)
Object.freeze(this)
}
setUri (uri) {
this.uri = uri
}
@Leko
Leko / build-ios
Last active Sep 6, 2017
Build ReactNative application via CLI
View build-ios
#!/usr/bin/env bash
# Usage:
# build-ios <SCHEME> <EXPORT_PLIST>
#
# SCHEME:
# EXPORT_PLIST:
set -eu
SCHEME=$1
@Leko
Leko / .gitignore
Last active Nov 13, 2018
Example of text to speech with VOICELOID(c)
View .gitignore
.env
node_modules
You can’t perform that action at this time.