Skip to content

Instantly share code, notes, and snippets.

@sowawa
sowawa / memcached
Created April 2, 2012 04:28
memcached start/stop script for rackhub
#! /bin/sh
#
# chkconfig: - 55 45
# description: The memcached daemon is a network memory cache service.
# processname: memcached
# config: /etc/sysconfig/memcached
# Source function library.
# . /etc/rc.d/init.d/functions
@sowawa
sowawa / vfs_statfs.diff
Created April 8, 2012 01:48
git diff kernel 2.6.36 at 3cafe1c
diff --git a/fs/aufs/branch.c b/fs/aufs/branch.c
index 9cd242e..a72836f 100644
--- a/fs/aufs/branch.c
+++ b/fs/aufs/branch.c
@@ -321,11 +321,11 @@ static int au_wbr_init(struct au_branch *br, struct super_block *sb,
* a limit for rmdir/rename a dir
* cf. AUFS_MAX_NAMELEN in include/linux/aufs_type.h
*/
- h_dentry = path->dentry;
- err = vfs_statfs(h_dentry, &kst);
@sowawa
sowawa / file_list.diff
Created April 8, 2012 01:49
git diff kernel 2.6.36 at fe4d2ca
diff --git a/fs/aufs/branch.c b/fs/aufs/branch.c
index 55a8fab..4687a35 100644
--- a/fs/aufs/branch.c
+++ b/fs/aufs/branch.c
@@ -851,13 +851,12 @@ static unsigned long long au_farray_cb(void *a,
{
unsigned long long n;
struct file **p, *f;
- struct list_head *head;
+ struct super_block *sb = arg;
@sowawa
sowawa / README.md
Created April 25, 2012 17:14
Rackhub 2nd generation

Gist一枚でわかる、Rackhub 2nd generation!

「巷で人気?のプログラミング言語」をひと通りインストールした プログラマのためのホスティングサービスRackhubの環境の新バージョンをリリースしました。

前回からいくつかのアーキテクチャの変更を行い、より使いやすくて安定した環境をお手軽に使えるようになりました。 大きな変更は、これまではコンテナ型仮想化を使っていましたが KVMによるフルバーチャライズド環境になりました。 KVM自体は、もうめずらしくもなんともない技術なので特筆することはとくにないと思うのですが、コンテナ型環境の抱える問題との決別をという意味では、良い変更になったのではないかと思います。

@sowawa
sowawa / .recipe
Created April 28, 2012 03:45
Installing rails 4.0.0 beta
thumbnail: http://pds.exblog.jp/pds/1/201101/16/02/d0055302_13383029.jpg
video: http://www.youtube.com/watch?v=UE27t_LJpx0
@sowawa
sowawa / .gitignore
Created April 28, 2012 07:34
Rails 4.0 beta new repository named hoge
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global
# Ignore bundler config
/.bundle
# Ignore the default SQLite database.
@sowawa
sowawa / #{fileName}
Created April 28, 2012 16:53
This is a test description
from api
@sowawa
sowawa / #{fileName}
Created April 28, 2012 16:54
This is a test description
from api
@sowawa
sowawa / consistent_hashr.rb
Created May 7, 2012 07:23 — forked from prisoner/consistent_hashr.rb
A Consistent Hashing implementation for Ruby
require 'zlib'
module ConsistentHashr
@circle = {}
@number_of_replicas = 20
##
# Computes a key
def self.hash_key(key)
Zlib.crc32("#{key}")