Skip to content

Instantly share code, notes, and snippets.

View shrkw's full-sized avatar

Hiroyuki Shirakawa shrkw

  • Nagano, Japan
View GitHub Profile
@shrkw
shrkw / commit_types.txt
Created September 5, 2023 04:53
Conventional Commit types
build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
chore: Other changes that don't modify src or test files
ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
docs: Documentation only changes
feat: A new feature
fix: A bug fix
perf: A code change that improves performance
refactor: A code change that neither fixes a bug nor adds a feature
style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
test: Adding missing tests or correcting existing tests
# ==== Emojis ====
# 🐛 :bug: バグ修正
# ♻️ :recycle: リファクタリング
# 🎨 :art: コードフォーマット
# 📝 :memo: ドキュメンテーション
# 💄 :lipstick: UI, スタイルファイルの変更
# 💬 :speech_balloon: テキスト、文字列の変更
# 🔥 :fire: コード、ファイルの削除
@shrkw
shrkw / tor.py
Created August 5, 2015 08:29
tornado app on gunicorn
# https://github.com/benoitc/gunicorn/blob/master/examples/frameworks/tornadoapp.py
# gunicorn -k tornado tor:app
import tornado.ioloop
import tornado.web
import tornado.options
tornado.options.define('port', type=int, default='8080', help=u'port number')
class MainHandler(tornado.web.RequestHandler):
def get(self):
@shrkw
shrkw / deepEquals.ts
Created February 15, 2021 05:29
check equality depp
function is(x: unknown, y: unknown): boolean {
if (x === y) {
return x !== 0 || y !== 0 || 1 / x === 1 / y;
} else {
return x !== x && y !== y;
}
}
export function deepEquals<T>(objA: T, objB: T): boolean {
if (is(objA, objB)) return true;
@shrkw
shrkw / gunicorn_with_virtualenv
Created October 31, 2013 10:51
CentOS init script for Gunicorn with Virtualenv
#!/bin/sh
#
# gunicorn_sr Startup script for gunicorn for sr
#
# chkconfig: - 86 14
# processname: gunicorn
# pidfile:
# description: Python application server
#
### BEGIN INIT INFO
@shrkw
shrkw / my-requirements-towards-my-job.md
Last active September 15, 2020 00:36
ぼくが職場に求めるもの、もしくは、組織を作るときに大切にしたいこと。該当する項目が増えるほど、楽しく働けると思う。今後も思いついた時に更新。

転職するときに考えること

軸はいろいろある。

キャリアカウンセラーの壁に貼ってあるバッド・カデルの図

https://www.waicrew.com/2015/02/07/

  • "なにをするか"
@shrkw
shrkw / api.ts
Last active August 19, 2020 10:45
// tslint:disable
/**
* test
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@shrkw
shrkw / file0.rb
Last active February 2, 2020 16:34
RubyでScalaのケースクラスっぽいことがしたかったのでStructを使えばよかった ref: https://qiita.com/shrkw/items/79772b6691f1aee94570
class Food
attr_reader :price, :name
def initialize(price, name)
@price = price
@name = name
end
end
@shrkw
shrkw / pyenv_pipenv_mac.md
Last active December 19, 2019 04:33
Install pyenv, specific version pythons and pipenv on macOS

Install pyenv, specific version pythons and pipenv on macOS

pyenv and pythons

VERSION=3.8.0
@shrkw
shrkw / image1.jpg
Last active September 20, 2019 10:15
Kingdomino 日本語ルール
image1.jpg