Skip to content

Instantly share code, notes, and snippets.

Minoru Mizutani mmizutani

  • Tokyo
View GitHub Profile
@mmizutani
mmizutani / main.go
Created Oct 11, 2018 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@mmizutani
mmizutani / 1.generate_dockerignore.py
Created Sep 2, 2018 — forked from wassname/1.generate_dockerignore.py
Convert .gitignore to .dockerignore: quick and dirty.
View 1.generate_dockerignore.py
"""
Convert .gitignore to .dockerignore: quick and dirty.
This is a quick and dirty script to convert this:
`__pycache__/`
Into this:
```
__pycache__
*/__pycache__
@mmizutani
mmizutani / elasticsearch-cheatsheet.txt
Created Aug 27, 2018 — forked from stephen-puiszis/elasticsearch-cheatsheet.txt
Elasticsearch Cheatsheet - An Overview of Commonly Used Elasticsearch API Endpoints and What They Do
View elasticsearch-cheatsheet.txt
# Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands
# cat paths
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/indices
/_cat/indices/{index}
@mmizutani
mmizutani / libreoffice
Created Jun 8, 2018 — forked from fintanmm/libreoffice
LibreOffice headless server script
View libreoffice
#!/bin/bash
# LibreOffice headless server script
#
# chkconfig: 2345 80 30
# description: headless openoffice server script
# processname: libreoffice
#
# Author: Vic Vijayakumar
# Modified by Federico Ch. Tomasczik
# and then by Mark Pavlichuk
@mmizutani
mmizutani / gist:4e1dfa5ffd4c1fef2964c2424b9a4856
Created Apr 29, 2018 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:4e1dfa5ffd4c1fef2964c2424b9a4856

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 Apr 29, 2018 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
View GitCommitEmoji.md
@mmizutani
mmizutani / Noto-Sans-Japanese.md
Created Apr 10, 2018 — forked from manabuyasuda/Noto-Sans-Japanese.md
Noto Sans Japaneseを使うための手順。
View Noto-Sans-Japanese.md

Noto Sans Japanese

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

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

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

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

@mmizutani
mmizutani / install-arch-linux-rpi-zero-w.sh
Created Jan 15, 2018 — 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).
View install-arch-linux-rpi-zero-w.sh
#!/bin/sh -exu
dev=$1
cd $(mktemp -d)
function umountboot {
umount boot || true
umount root || true
}
# RPi1/Zero (armv6h):
@mmizutani
mmizutani / caffeinated_timemachine_backup.sh
Created Jan 8, 2018
Single line command to prevent macOS from sleeping while Time Machine backup is in progress
View caffeinated_timemachine_backup.sh
#!/usr/bin/env bash
caffeinate -i tmutil startbackup
You can’t perform that action at this time.