Skip to content

Instantly share code, notes, and snippets.

View linyows's full-sized avatar

Tomohisa Oda linyows

View GitHub Profile
@hgfischer
hgfischer / benchmark+go+nginx.md
Last active January 6, 2025 09:05
Benchmarking Nginx with Go

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI
@tcnksm
tcnksm / docker_cheat.md
Last active January 14, 2025 15:09 — forked from wsargent/docker_cheat.md
Docker 虎の巻

Docker 虎の巻

何故Dockerを使うべきか

Why Should I Care (For Developers)

"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."

#!/usr/bin/env ruby
require 'octokit'
require 'pit'
require_params = {
:login => 'login',
:password => 'password'
}
config = Pit.get('github', :require => require_params)
@studio3104
studio3104 / WeeChat を入れてやったことまとめ.md
Last active January 19, 2019 04:19
都度追記型 WeeChat メモ

基本設定

  • nick

    weechat: /set irc.server_default.nicks "studio3104,studio3104_,studio3104__"
    
  • higlight

@pzurek
pzurek / Twelve_Go_Best_Practices.md
Last active February 22, 2025 14:29
Twelve Go Best Practices
@kitak
kitak / doc.md
Last active October 18, 2023 09:57
コマンドによる「負荷」の原因切り分け

コマンドによる「負荷」の原因切り分け

この文章では、Linuxコマンド、sar, top, psを使って、一般的に負荷といわれるものの原因を切り分けることを目的とする。

そもそも負荷とは

「複数のタスクによるサーバリソースの奪い合いの結果に生じる待ち時間」を一言で表した言葉。OSのチューニングとは負荷の原因を知り、それを取り除くことにほかならない。

ボトルネックの見極め作業の大まかな流れ

  • ロードアベレージ(処理を実行したくても、実行できなくて待たされているプロセス(CPUの実行権限が与えられるのを待っている、またはディスクI/Oが完了するのを待っている)の数)を見る
@Apsu
Apsu / preset.sh
Last active March 13, 2024 01:24
GPG passphrase preset to be called from pam_exec
#!/bin/bash
# grab PAM-provided auth token
read token
# gpg-preset-passphrase is often in /usr/libexec or /usr/lib/gnupg
preset=/usr/lib/gnupg/gpg-preset-passphrase
# grab our user, USER isn't always set
USER=$(id -un)
@BlakeGardner
BlakeGardner / Install HTTPie.md
Last active November 5, 2020 08:43
Install HTTPie Mac OS X

This is a quick guide on installing HTTPie for Mac OS X systems. This is also useful if you want the python package management utility pip. An installed copy of Homebrew is a prerequisite.

HTTPie

The easy way

brew install httpie
@ympbyc
ympbyc / FunctionalJs.md
Last active November 2, 2024 00:52
Functional JavaScript

Functional JavaScript

2013 Minori Yamashita [email protected]

-- ここにあなたの名前を追記 --

目次

@j3tm0t0
j3tm0t0 / ec2ssherror.md
Last active February 3, 2025 03:46
EC2にsshでログインできなくなった場合の対処法

EC2にsshでログインできなくなった場合の対処法


##Connection Timeout または No route to host ###ヘルスチェックステータス1/2 OSレベルでの問題が起きています。
→ インスタンスをRebootしてみましょう。 ###ヘルスチェックステータスが0/2 物理ホスト障害の可能性があります。
→ インスタンスをStop/Startしてみましょう(別の物理ホストに移動させる事ができます)
※ Stoppingの状態で停止しない場合には、force stopを行います(Management Consoleから2回目のstop/ec2-stop-instances --force i-xxxxxxxx)