Skip to content

Instantly share code, notes, and snippets.

View mmizutani's full-sized avatar

Minoru Mizutani mmizutani

  • Tokyo
  • 12:52 (UTC +09:00)
View GitHub Profile
@mmizutani
mmizutani / gist:4e1dfa5ffd4c1fef2964c2424b9a4856
Created April 29, 2018 05:47 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@mmizutani
mmizutani / GitCommitEmoji.md
Created April 29, 2018 05:30 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@mmizutani
mmizutani / Noto-Sans-Japanese.md
Created April 10, 2018 17:15 — forked from manabuyasuda/Noto-Sans-Jp.md
Noto Sans Japaneseを使うための手順。

Noto Sans Japanese

Noto Sans Japaneseを Webサイトで使う場合、大きく分けて2つの方法があります。

  1. CDNを使う場合
  2. サーバーにフォントファイルを置く場合

CDNの場合は、他のサイトを含めて一度でも読み込まれていればブラウザ側でキャッシュを持っているので、読み込み速度が速くなることが期待できます。
サーバーのフォントファイルはサブセット化(不要なデータを削除すること)でファイルサイズを削減できるメリットがあります。

基本的にはCDNを利用して、フォールバックとしてサーバーに置いたフォントファイルとシステムフォントを指定するのがいいでしょう。

@mmizutani
mmizutani / install-arch-linux-rpi-zero-w.sh
Created January 15, 2018 14:48 — forked from larsch/install-arch-linux-rpi-zero-w.sh
Install Arch Linux ARM for Raspberry Pi Zero W on SD Card (with commands to configure WiFi before first boot).
#!/bin/sh -exu
dev=$1
cd $(mktemp -d)
function umountboot {
umount boot || true
umount root || true
}
# RPi1/Zero (armv6h):
@mmizutani
mmizutani / gist:f78a2a8cc7aaf858cf1e27c91612bd1e
Created October 9, 2017 00:49 — forked from rosylilly/gist:3401612
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
/log
/tmp
*.sqlite3
@mmizutani
mmizutani / mysql.database.yml
Created September 5, 2017 22:04 — forked from jwo/mysql.database.yml
Sample config/database.yml from Rails. Postgres, MySQL, and SQLite
#
# Install the MYSQL driver
# gem install mysql2
#
# Ensure the MySQL gem is defined in your Gemfile
# gem 'mysql2'
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
@mmizutani
mmizutani / base_controller.rb
Created August 30, 2017 22:43 — forked from dhoelzgen/base_controller.rb
CORS in Rails 4 APIs
class API::V1::BaseController < ApplicationController
skip_before_filter :verify_authenticity_token
before_filter :cors_preflight_check
after_filter :cors_set_access_control_headers
def cors_set_access_control_headers
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS'
@mmizutani
mmizutani / mine-open.desktop
Created May 27, 2017 14:06
#Better Errors #Rubymine #Ubuntu
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/home/max/scripts/mine-open.sh %u
Name[en_US]=MineOpen
Comment[en_US]=Small, easy-to-use program to access Rubymine
Name=MineOpen
Comment=Small, easy-to-use program to access Rubymine
@mmizutani
mmizutani / ssl_puma.sh
Created May 20, 2017 13:54 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key