Skip to content

Instantly share code, notes, and snippets.

View shouhei's full-sized avatar

Shouhei shouhei

  • japan
View GitHub Profile
@jboner
jboner / latency.txt
Last active September 18, 2026 21:25
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@ysaotome
ysaotome / centos66_64bit_Plain_setup_script_for_niftycloud.sh
Last active May 13, 2016 01:29
CentOS 6.6 64bit Plain setup script for NiftyCloud (http://cloud.nifty.com/)
#!/bin/bash
# Description:CentOS 6.6 64bit Plain setup script for NiftyCloud (http://cloud.nifty.com/)
# File:centos66_64bit_Plain_setup_script_for_niftycloud.sh
# 2016/05/01 @ysaotome
(
#===============================================
# Settings
#===============================================
##rootのパスワード
#!/bin/bash
# File:change_root_password.sh
# 2013/07/18 @ysaotome
#===============================================
#設定したいrootパスワード「hoge##123」の部分を改変
#===============================================
ROOT_PASSWORD='hoge##123'
#===============================================
SALT=$(/usr/bin/uuidgen| /usr/bin/tr -d '-')

シェルTIPS 20min

コンピュータの方がうまくできることに人間を使うな。
-- Tom Duff

キーバインド

Emacs の基本操作とおなじ。

@voluntas
voluntas / shiguredo_env.rst
Last active December 2, 2024 00:23
時雨堂を支える環境

時雨堂を支える環境

日時:2024-12-02
作:時雨堂
バージョン:2024.3
url:https://shiguredo.jp/

2024-12 時点で従業員は全員フルリモート勤務中

@voluntas
voluntas / shiguredo.rst
Last active August 30, 2026 12:59
時雨堂コトハジメ
@tanakh
tanakh / gist:8750952
Created February 1, 2014 11:20
なぜ我々はHaskellを使うのか

スタートアップ企業 Silk が、Haskellを採用した理由。

http://engineering.silk.co/post/31920990633/why-we-use-haskell

As a newly started company, we have a lot of technical decisions to make. One of the important ones is the choice of a programming language. Since we’re building a web application, this goes for both the client (i.e. the web browser) and the server.

新しく始めた会社として、我々はたくさんの技術的決定を行わなければなりません。中でも重要なのは、プログラミング言語の選択です。我々はウェブアプリケーションを作っていたので、この選択がクライアント(Webブラウザなど)とサーバの両方で必要になります。

On the client, there wasn’t much discussion. Javascript is the only viable choice, unless you want to use Flash or similar plugin-based models. But on the server, we had more freedom. Popular choices for web applications are dynamically typed languages like Ruby, Python and PHP, and statically typed languages like Java and C#.

# $Id: screen-keys.conf,v 1.7 2010-07-31 11:39:13 nicm Exp $
#
# By Nicholas Marriott. Public domain.
#
# This configuration file binds many of the common GNU screen key bindings to
# appropriate tmux key bindings. Note that for some key bindings there is no
# tmux analogue and also that this set omits binding some commands available in
# tmux but not in screen.
#
# Note this is only a selection of key bindings and they are in addition to the
@kskb
kskb / rails new
Last active December 10, 2015 06:08
rails new する時のオプションを毎回忘れるのでメモ
// $ rails new fuga --skip-bundle --skip-test-unit -d sqlite3
$ cd fuga
$ bundle install --path vendor/bundle --without production
@relishable
relishable / angular-filter-currency.js
Created April 22, 2014 11:11
Angularjs currency フィルタを日本円で使う
{{cost | currency:"\\"}}