Skip to content

Instantly share code, notes, and snippets.

View tomonari-t's full-sized avatar

tomonari_takahashi tomonari-t

View GitHub Profile
@e10101
e10101 / Dockerfile
Last active December 3, 2019 16:16
Add google noto-cjk font to docker image.
RUN cd /usr/local/share/fonts/ \
&& wget "https://github.com/googlei18n/noto-cjk/blob/master/NotoSansCJKsc-Medium.otf?raw=true" \
&& fc-cache -f -v
@mono0926
mono0926 / commit_message_example.md
Last active June 6, 2025 05:12
[転載] gitにおけるコミットログ/メッセージ例文集100
@azu
azu / react-toggle.md
Last active August 22, 2018 02:01
ReactでToggleコンポーネントを作るケース
  1. ABToggleButtonのような実装を各Toggleしたいコンポーネントごとに作る
    • クラスが増える
    • class ABToggleButton extends React.Component{}
    • ToggleButtonごとに明示的な名前をつけられる
    • <ABToggleButton isEditing={true}/>
    • 必要なコンポーネント = 3ファイル
  2. 関数を使う
    • 引数にa, b
    • createToggleButton(a, b);
  • 高階関数を使うパターン
@twolfson
twolfson / README.md
Last active August 1, 2023 10:45
Node.js job queue evaluation

We are building a Node.js service which will need asynchronous support for tasks like sending emails. Here's our evaluation:

@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
@i-takehiro
i-takehiro / Drink.java
Last active July 16, 2021 13:17
第21回 DDD(ドメイン駆動設計)勉強会in仙台( http://connpass.com/event/28737/ ) のリファクタリング用コード
package vending;
public class Drink {
public static final int COKE = 0;
public static final int DIET_COKE = 1;
public static final int TEA = 2;
private int kind;
@toagit
toagit / xlsUnlock.vbs
Created July 14, 2015 00:58
エクセルパスワード解除vbスクリプト
Option Explicit
Dim max
Dim min
'===============================================================================
':: 最大(max)・最小(min)のパスワード長を設定してください
max = 10
min = 3
'===============================================================================
':: ここから下はいぢらないでください
@chantastic
chantastic / on-jsx.markdown
Last active May 13, 2025 12:04
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@nkbt
nkbt / .eslintrc.js
Last active April 1, 2025 03:07
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@jeremydw
jeremydw / gist:bc901de8b7e59cbeb190
Created February 27, 2015 02:06
Python webapp2 application that serves files behind HTTP Basic Auth
import webapp2
import mimetypes
import os
import time
from datetime import datetime
import base64
_here = os.path.dirname(__file__)
USERNAME = 'foo'