Skip to content

Instantly share code, notes, and snippets.

View kentaro-m's full-sized avatar
🦄
Happy coding everyday.

Kentaro Matsushita kentaro-m

🦄
Happy coding everyday.
View GitHub Profile
@kentaro-m
kentaro-m / tdd_handson.md
Created July 28, 2021 17:26
TDDハンズオン (Kanazawa.js Meetup)

TDDハンズオン

モブプログラミングでTDDを実践しよう会の進行用スクリプト

事前準備

  • Node.jsのインストール
  • Visual Studio Codeのインストール
  • Visual Studio Live Share 拡張機能のインストール
  • タイマー

※ 実際に実装やテストを作成する際に用いる、JavaScriptのテストフレームワーク「Jest」のセットアップ済みのリポジトリは運営側で準備しています。

💪 The Habit Of Reading Books 📖 1 Reading Now 📚 2 Tsundoku 🔖 7 Have Read

@kentaro-m
kentaro-m / read-books.md
Last active April 20, 2020 17:18
📚read-books.md

💪 The Habit Of Reading Books 📚 10 Tsundoku 🔖 50 Have Read 📖 2 Reading Now

@kentaro-m
kentaro-m / speaker_shuffle.js
Created January 19, 2020 05:53
Kanazawa.js meetup #1 のLT発表順を決めるJavaScript
/**
* Fisher-Yates algorithmに基づいたシャッフル関数
* 30-seconds-of-codeの実装例より
* @see https://github.com/30-seconds/30-seconds-of-code/blob/master/snippets/shuffle.md
*/
const shuffle = ([...arr]) => {
let m = arr.length
while (m) {
const i = Math.floor(Math.random() * m--)
;[arr[m], arr[i]] = [arr[i], arr[m]]
import React, {useCallback, useEffect, useState} from 'react';
import styled from '@emotion/styled/macro';
import * as yup from 'yup';
import { FontSize } from '../constants/base';
import MessageBox from './MessageBox';
import { authenticate } from '../service/user';
const Form = styled.form`
font-family: Noto Sans JP;
width: 25%;

2 books / month 532 pages / month 18 pages / day

version: 2
defaults: &defaults
working_directory: ~/workspace
docker:
- image: circleci/node:6.12.0
environment:
CIRCLE_BUILD_IMAGE: ubuntu
ATOM_CHANNEL: stable
DISPLAY: :99

github-commenter

Comment on the pull request with the value received from stdin on Circle CI.

Install

$ npm install -g github-commenter

Usage

@kentaro-m
kentaro-m / atomTestRunner.js
Created July 8, 2017 14:53
Test runner for Atom package test using mocha
import { allowUnsafeEval, allowUnsafeNewFunction } from 'loophole';
const { createRunner } = allowUnsafeEval(() => {
return allowUnsafeNewFunction(() => {
return require('atom-mocha-test-runner');
});
});
const chai = allowUnsafeEval(() => {
return allowUnsafeNewFunction(() => {
#!/bin/bash
commit_message=`git log --format=%B -n 1 ${CIRCLE_SHA1}`
if [[ $commit_message != "Merge"* ]] ; then
echo 'deploy skip [excluded build]';
exit 0;
fi
pr_title=`curl -H "User-Agent: ${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" \