Skip to content

Instantly share code, notes, and snippets.

View nabeken's full-sized avatar

Tanabe Ken-ichi nabeken

View GitHub Profile
-- Include awesome libraries, with lots of useful function!
require("awful")
require("beautiful")
-- {{{ Variable definitions
-- This is a file path to a theme file which will defines colors.
theme_path = "/home/nabeken/.config/awesome/default/theme"
-- This is used later as the default terminal to run.
terminal = "mlterm --sb=false"
#!/bin/sh
function gettree {
commit=$1
dir=$2
git ls-tree ${commit} | grep ${dir} | cut -d' ' -f1 | cut -d' ' -f3
}
function getmsg {
[quagga_*]
user root
env.as_number ${YOUR_AS_NUMBER}
helpers do
def protected!
response = callcc do |cont|
auth = Rack::Auth::Digest::MD5.new(cont, "Administrator only") do |username|
"password" # username is ignored, or Password is always 'password' in this example.
end
auth.opaque = $$.to_s
auth.call(request.env)
end
@nabeken
nabeken / ldns-1.6.13.ebuild
Created July 14, 2011 14:24
unbound.ebuild
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="3"
PYTHON_DEPEND="python? 2:2.5"
inherit autotools eutils python
DESCRIPTION="ldns is a library with the aim to simplify DNS programing in C"
低速になるのはppp(8)で割り込み/コンテキストスイッチが多発するためか?
pppoe(8)で 40Mbps〜70Mbps あたり。つまるとガクっと数値が落ちる(その間通信もつまる)。
procs memory page disk traps cpu
r b w avm fre flt re pi po fr sr sd0 int sys cs us sy id
0 0 0 265248 1334864 74 0 0 0 0 0 0 46 668 113 0 0 100
0 0 0 265248 1334864 77 0 0 0 0 0 0 43 655 118 0 0 100
0 0 0 265248 1334864 405 0 0 0 0 0 0 46 760 112 0 0 100
0 0 0 265248 1334864 74 0 0 0 0 0 0 3141 50811 11431 1 10 89
@nabeken
nabeken / .config
Created November 5, 2011 09:42
egrep 'HID|MOUSE' /usr/src/linux/.config
CONFIG_MAC_EMUMOUSEBTN=y
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
@nabeken
nabeken / gist:1998039
Created March 8, 2012 02:05
rebooting issue on FreeBSD 9.0-RELEASE with zfs root
Fatal trap 12: page fault while in kernel mode
cpuid = 2; apic id = 04
fault virtual address = 0x4a0
fault code = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff806d958f
stack pointer = 0x28:0xffffff833d029a10
frame pointer = 0x28:0xffffff833d029a90
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
@nabeken
nabeken / gist:2312269
Created April 5, 2012 16:16
rebooting after ezjail-admin stop start with VIMAGE in FreeBSD 9.0-RELEASE
ACPI Warning: 32/64X FACS address mismatch in FADT - 0xCB61DF40/0x00000000CB61DE40, using 32 (20110527/tbfadt-517)
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <INTEL DH55TC> on motherboard
acpi0: Power Button (fixed)
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
cpu0: <ACPI CPU> on acpi0
ACPI Warning: Incorrect checksum in table [SSDT] - 0x3F, should be 0x1F (20110527/tbutils-282)
cpu1: <ACPI CPU> on acpi0
@nabeken
nabeken / gist:2326227
Created April 7, 2012 07:32
my gitconfig
# cf. http://whileimautomaton.net/2009/05/08003459
# cf. http://subtech.g.hatena.ne.jp/secondlife/20101129/1291031478
[alias]
stat = status
st = status
co = checkout
ci = commit -v
dif = diff
pu = pull