Skip to content

Instantly share code, notes, and snippets.

@hiboma
hiboma / nginx.conf
Created January 24, 2012 13:02
Nginx+Lua+Redis で動的upstream
worker_processes 1;
error_log /dev/stderr debug;
events {
worker_connections 256;
}
http {
server {
@hiboma
hiboma / ffi-lxc.rb
Created February 22, 2012 15:10
FFIでLXCをbindする - great
require 'ffi'
module LXC
extend FFI::Library
ffi_lib "/usr/local/lxc/lib/liblxc.so"
attach_function :lxc_stop, [ :string ], :int
end
puts LXC::lxc_stop(ARGV[0])
@wozozo
wozozo / skip_gihyo_ad_page.user.js
Created February 29, 2012 03:02
gihyo.jp の広告画面をスキップします
// ==UserScript==
// @name skip gihyo Ad page
// @namespace http://www.fujimotoyoichi.com/
// @include http://gihyo.jp/*
// @author wozozo
// @charset UTF-8
// @version 0.0.1
// ==/UserScript==
(function(){
require 'mkmf'
# http://www.ruby-lang.org/ja/old-man/html/mkmf.html
# http://brandish.xrea.jp/BlackCity/labo/labo_ruby_ext_2.html
# http://d.hatena.ne.jp/yarb/20090724/p1
dir_config('lxc')
if have_header('lxc/namespace.h') and have_library('lxc') and have_func("lxc_attach")
$libs = append_library($libs, "lxc")
create_makefile("lxc")
else
@paulmillr
paulmillr / active.md
Last active June 24, 2024 13:58
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@morygonzalez
morygonzalez / github-follow-organization.user.js
Created May 14, 2012 02:58 — forked from technolize/github-follow-organization.user.js
github の organization ページにもフォローボタンを表示する
// ==UserScript==
// @name follow organization
// @description Show follow button on github organization page
// @namespace http://www.portalshit.net/
// @include https://github.com/*
// @version 0.1
// @license MIT License
// @work Google Chrome
// ==/UserScript==

@ITやテッククランチがアホすぎてつらい。

要約

Rap GeniusというサービスがHerokuに月額2万ドル払っていて、そのサービスに満足していたという。 内訳はよくわからないが、Herokuの「サクセスストーリー」に公開されているところによると、彼らはWeb用のdynoを120使っているとのこと。 http://success.heroku.com/rapgenius

New Relic(サードパーティのパフォーマンス計測アドオン)には年間 $63116.13 払っているという。

@mala
mala / gist:5002784
Last active December 14, 2015 00:59
このLEMONってのがrapgeniusの人ね。
http://cache.gyazo.com/91f2e906a220fbeef2e9283b0aee597a.png
Unicorn使っても2workerで動いているところに遅いリクエストが3件来たら詰まるよ!!
根本的な解決にならない!!
とか言ってるんですよ。
じゃあ例えば、並列数1x10と並列数2x5で遅いリクエスト5件投げてキューに詰まる確率を考えてみよう。
絵で表すとこう。絵じゃなくて文字だけど。

ヒューマンエラーを許容する

  • 「きをつけよう」は意味ない
  • 実装、プラクティス、プロセスに落とし込む

バグ、ミスオペの混入を防ぐ

  • コードレビュー
  • 二人で作業
  • テストケース
@Jxck
Jxck / main.go
Last active August 31, 2017 10:27
interface of Go blog sample
package main
/*
Go のインタフェース設計
参考
https://code.google.com/p/go-wiki/wiki/GoForCPPProgrammers
http://jordanorelli.tumblr.com/post/32665860244/how-to-use-interfaces-in-go
http://research.swtch.com/interfaces
http://www.airs.com/blog/archives/277