Skip to content

Instantly share code, notes, and snippets.

View hfm's full-sized avatar

Okumura Takahiro hfm

View GitHub Profile
@sorah
sorah / winfont.css
Last active September 1, 2022 05:35
stylus windows japanese font
@font-face {
font-family: "メイリオ";
src: local("NotoSansCJKjp-Regular");
}
@font-face {
font-family: "Meiryo";
src: local("NotoSansCJKjp-Regular"), local("SourceHanSans-Regular");
}
@font-face {
font-family: "游ゴシック";
@mala
mala / covid19-twitter-research_01.md
Last active December 31, 2021 05:58
生活と意見: ソーシャルディスタンスなどと称してユーザー名や文章にスペースを挟む行為についての苦情

生活と意見: ソーシャルディスタンスなどと称してユーザー名や文章にスペースを挟む行為についての苦情

更新履歴

2020-05-13 追記

@mala
mala / CVE-2019-5418_is_RCE.md
Last active February 7, 2021 04:25
Rails の CVE-2019-5418 は RCE (Remote code execution) です
@rrreeeyyy
rrreeeyyy / prometheus-2018.md
Last active September 12, 2019 10:01
Prometheus 2018 の近況と基礎

https://prometheus.io/ 2.3.2 (2018-07-12)

exporter 周りは大分充実してきたし、retention period に応じたメモリがある程度あればI/Oがひどいことになることはないので運用はまあまあ簡単だと思う。 時系列データも圧縮されるので、300000 メトリクス・解像度 15 秒・14 日間保存で 50GB ぐらいで済んでる。 PromQL を投げたときに CPU を結構食うので、ルールをたくさん書きたいとかめっちゃ PromQL を眺めたいって時は CPU を積んであげるのがオススメ。

long-term storage 周りはそんなにシュッとはしてないので、基本的には 14d ぐらいの短い周期のデータを解像度高く見たいとか、 そんな真剣に長期のメトリクスを眺めなくていいような時とかに使うのが良いと思う。 (まあ本気を出せば long-term storage もできなくないが、運用コストはまあまあ高まると思う。)

@hypermkt
hypermkt / マイクロサービスアーキテクチャ.md
Last active September 16, 2020 04:46
マイクロサービスアーキテクチャの読書メモです

マイクロサービスアーキテクチャ 読書メモ

1章 マイクロサービス

  • マイクロサービスは、協調して動作する小規模で自律的なサービスである
    • 小さく、かつ1つの役割に専念する
    • 独立したシステムで、サービス間はAPIで通信をする
  • メリット
    • サービス毎に異なる技術を使用できる、迅速に技術を採用できる
      • 但し複数の技術の採用はオーバーヘッドが伴う
  • システムのあるコンポーネントに障害が発生しても、その障害が連鎖しなければ、問題を分離してシステムの残りの部分は機能し続けることができる
@kazuho
kazuho / git-blame-pr.pl
Last active June 28, 2022 07:15
git-blame by PR #
#! /usr/bin/perl
#
# Written in 2017 by Kazuho Oku
#
# To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
#
use strict;
use warnings;
@hatsusato
hatsusato / kmc-advent-2017.md
Last active November 25, 2023 05:46
gpg のはなし

gpg のはなし

この記事は [KMC Advent Calendar 2017][advent] の 10 日目の記事です。 昨日の記事は tron 君 ([id:tron_kmc][tron-id]) の[今年の活動を振り返る - tron-Factory 業務日誌][tron]でした。 はたち:tada:めでたい:congratulations:

はじめに

KMC 6 回生の hatsusato です。 修士 2 回生ともなると研究にかまけて KMC 活動がおろそかになっているので、この場を借りて申し訳程度に KMC 活動をしようと思います。

@shyouhei
shyouhei / gist:266178ffedab5767a5b69b972c76f88a
Created September 27, 2017 07:31
優秀なプログラマーになるためのコツ

優秀なプログラマーになるためのコツ

重要な順で

優秀なプログラマーになるには非常に長い時間がかかるという現実を直視すべし

優秀なプログラマーというのは寝ている間に異世界に召喚されて無双するのとはわけが違うんですよ。

自分の例で言うとプログラミングを始めた中学生の時から優秀なプログラマだったかって、そんなわけない。みんなヘッポコからスタートしているに決まってるわけです。以来二十余年、地道に生き恥を晒し続けてきた結果として、現在いちおう業界の末席を汚すところまで来ている。このプロセスから目を背けるべきではないです。優秀なプログラマーに生まれる人間なんかいない。優秀なプログラマーに「育つ」んだし、それには時間が必要。今日から無双したいと思うな。

WIP某所で喋るための草稿。

Testable JavaScript

当たり前のことを書く。当たり前のことが、当たり前にできない人へ。JavaScriptだから、当たり前のことをしなくていいと思っている人達へ。

基本方針

  • それぞれのファイルは、可能な限り参照透過な関数を提供する
  • それぞれのファイルは、読み込んだだけでは副作用を起こさない
@othyn
othyn / factorio_headless_guide.md
Last active May 20, 2024 19:23
How to setup a Factorio Headless Server

[LINUX] Factorio Headless Server Guide

So, with credit to the Factorio wiki and cbednarski's helpful gist, I managed to eventually setup a Factorio headless server. Although, I thought the process could be nailed down/simplified to be a bit more 'tutorialised' and also to document how I got it all working for my future records.

The specific distro/version I'm using for this guide being Ubuntu Server 16.04.1 LTS. Although, that shouldn't matter, as long as your distro supports systemd (just for this guide, not a Factorio headless requirement, although most distros use it as standard now). The version of Factorio I shall be using is 0.14.20, although should work for any version of Factorio 0.14.12 and higher.

Just a note to newcomers: If there are any issues with the installation steps, people in the comments are doing a good job