Skip to content

Instantly share code, notes, and snippets.

Avatar
🍺
Now Brewing

Kengo Hamasaki hmsk

🍺
Now Brewing
View GitHub Profile
View resume.json
{
"meta": { "theme": "short" },
"basics": {
"name": "Kengo Hamasaki",
"label": "Software Developer",
"picture": "https://d1qb2nb5cznatu.cloudfront.net/users/1541642-medium_jpg?1462493251",
"email": "k.hamasaki@gmail.com",
"website": "http://hmsk.me",
"summary": "Kengo is an end to end web engineer from Japan. He started his carrier from DevOps but shifted his primary focus toward Frontend until today through Middleware and Backend. Dove into product management, design, and customer support as a first employee of a fast-growing startup. Current favorite areas are \"payment processing\" and \"static site generation\". Loving OSS development.",
"location": {
@hmsk
hmsk / typescript.js
Last active Jan 21, 2019
Simple module to use TypeScript on Nuxt
View typescript.js
export default function () {
// Nuxt resolves .ts extension
this.nuxt.options.extensions.push('ts')
// Extend webpack build
this.extendBuild(config => {
// Add ts-loader to import .ts
config.module.rules.push({
test: /\.ts$/,
loader: 'ts-loader',
@hmsk
hmsk / tsconfig.json
Created Jan 20, 2019
Typical tsconfig for Nuxt
View tsconfig.json
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "es2015"],
"module": "es2015",
"moduleResolution": "node",
"experimentalDecorators": true,
"noImplicitAny": false,
"noImplicitThis": false,
"strictNullChecks": true,
@hmsk
hmsk / keymap.c
Last active Dec 24, 2018
Figma Macros / QMK Keymap for Sweet16 by 1upkeyboard
View keymap.c
#include "sweet16.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT_ortho_4x4(
KC_PGUP, KC_PGDN, KC_N, LSFT(KC_N),
LALT(LGUI(KC_L)), LALT(LGUI(KC_T)), LALT(LGUI(KC_R)), LALT(LGUI(KC_J)),
LALT(KC_LT), LALT(KC_GT), LALT(KC_COMMA), LALT(KC_DOT),
LGUI(KC_B), LGUI(KC_I), LGUI(KC_U), KC_NO
)
};
@hmsk
hmsk / stylelint.config.js
Created Jul 24, 2018
My compact and efficient Stylelint configuration for Vue project
View stylelint.config.js
module.exports = {
processors: [
["@mapbox/stylelint-processor-arbitrary-tags", { fileFilterRegex: [/\.vue$/] }]
],
extends: [
"stylelint-config-standard",
"stylelint-config-recess-order"
],
rules: {
"no-empty-source": null
@hmsk
hmsk / gist:faca4cf551f8547e3d85bdcfe665fd44
Created Jul 5, 2018
Run commands in parallel and get exit code as totalized them
View gist:faca4cf551f8547e3d85bdcfe665fd44
cat > cmds << EOF
ls Applications
ls Desktop
ls Music
EOF
cat cmds | xargs -L1 -I BUILD -P3 bash -c BUILD
# -P[thread-num]
@hmsk
hmsk / toggle_audio_output.scpt
Created Jun 19, 2018
Toggle output device through System Preferences on macOS
View toggle_audio_output.scpt
tell application "System Events"
tell application "System Preferences"
activate
set current pane to pane "com.apple.preference.sound"
end tell
tell application process "System Preferences"
repeat until (exists window "Sound" of application "System Preferences")
delay 1
end repeat
tell tab group 1 of window "Sound"
@hmsk
hmsk / about.vue
Last active Mar 1, 2018
Determine locale with env variable
View about.vue
<!-- pages/about.vue -->
<template>
<div class="Content">
<div class="container">
<h1 class="Content__Title">{{ $t('about.title') }}</h1>
<p>{{ $t('about.introduction') }}</p>
</div>
</div>
</template>
@hmsk
hmsk / _lang_about.vue
Last active Mar 1, 2018
I18n in Nuxt.js
View _lang_about.vue
<!-- pages/_lang/about.vue -->
<template>
<div class="Content">
<div class="container">
<h1 class="Content__Title">{{ $t('about.title') }}</h1>
<p>{{ $t('about.introduction') }}</p>
</div>
</div>
</template>
@hmsk
hmsk / git-empty-commit.sh
Created Nov 29, 2017
[Make empty commit] #git
View git-empty-commit.sh
git commit --allow-empty -m "I'm empty" -n