Skip to content

Instantly share code, notes, and snippets.

View shinshin86's full-sized avatar
👶

Yuki Shindo shinshin86

👶
View GitHub Profile
""""""""""""""""""""""""""""""
" vimrc-202005
" (require: vim-plug, fzf)
" see: https://gist.github.com/shinshin86/17fe2e40529f6244f17d32ed2e0aeec3
"
" Install(Using curl):
" curl --output ~/.vimrc {this gist raw url}
""""""""""""""""""""""""""""""
call plug#begin('~/.vim/plugged')
""""""""""""""""""""""""""""""
" プラグインセットアップ
" (Qiitaの記事内で記述した.vimrc)
"
" URL:
" https://qiita.com/shinshin86/items/eb41e4fb513bb4d3e3cd
"
" インストール(curl使用):
" curl --output ~/.vimrc https://gist.githubusercontent.com/shinshin86/b1437d59c9228852354da0c5a8fdac64/raw/5e735502dd7b986be699c5ca29dbc8119b179420/qiita-2018-12-14.vimrc
""""""""""""""""""""""""""""""
/*
* Sample code of Node.js
* Make mp3 file hash(MD5)
* (Of Course when not file type of mp3 also ok!)
*/
const crypto = require('crypto');
const md5hex = async filepath => {
const md5hash = crypto.createHash('md5');
md5hash.update(filepath, 'binary');
@shinshin86
shinshin86 / clojure-repl-at-docker.sh
Created March 16, 2019 06:59
Start clojure repl sample at docker container.
# if not pulled docker container
# docker pull clojure
docker run -it --rm --name repl-clujure clojure /bin/bash
# start repl at docker container
lein repl
@shinshin86
shinshin86 / install-vim-plug-and-fzf.sh
Last active July 15, 2020 12:30
Install script "vim-plug" and "fzf"
########################################################
# This environment is already install "git" and "vim"
########################################################
# clean & update
apt-get autoclean
apt-get update
# Install curl
apt-get install -y curl
@shinshin86
shinshin86 / OpenGoogleChrome.applescript
Created November 11, 2018 13:34
Open Google Chrome on AppleScript
do shell script "open -a Google\\ Chrome {URL}"
@shinshin86
shinshin86 / docker-compose-dev-wordpress.yml
Created October 20, 2018 06:53
Create development environment of wordpress using docker compose.
version: '3.7'
services:
wordpress:
image: wordpress
restart: always
container_name: 'app-conatiner-name'
ports:
- 8080:80
@shinshin86
shinshin86 / go_build01.sh
Created February 26, 2018 12:04
Shell script for Go build. Target -> Linux(386, 64), Windows(386, 64), Darwin(386, 64)
#!/bin/sh
# reference : https://gist.github.com/twinbird/9cb8979e163e89ae6a88fd650291fd12
if [ $# != 1 ]; then
echo "Usage: $0 [binary name]"
exit 0
fi
fpath=$1
fname_ext="${fpath##*/}"
@shinshin86
shinshin86 / stdin-sample.js
Created February 6, 2018 14:19
stdin sample at Node.js
// stdin sample at Node.js
var lines = []
var rl = require('readline').createInterface({
input: process.stdin,
output: process.stdout
})
rl.on('line', ((line) => {
lines.push(line)
@shinshin86
shinshin86 / vuex-plugin-sample.js
Created January 25, 2018 21:29
vuex plugin sample
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const incrementPlugin = store => {
store.subscribe((mutation, state) => {
if(mutation.type === "showCount") {
state.count++
}