Skip to content

Instantly share code, notes, and snippets.

@gotnix
gotnix / Gentoo install command
Created February 10, 2012 15:58
install Gentoo shell history
Gentoo Linux handbook zh_CN
http://www.gentoo.org/doc/zh_cn/handbook/
Gentoo Linux AMD64 handbook zh_CN
http://www.gentoo.org/doc/zh_cn/handbook/handbook-amd64.xml
其他選擇:使用 genkernel
http://www.gentoo.org/doc/zh_tw/handbook/handbook-ppc.xml?part=1&chap=7#genkernel
http://www.gentoo.org/doc/zh_tw/handbook/handbook-amd64.xml?part=1&chap=7#genkernel
# Partion your HD and mkfs
@gotnix
gotnix / My Chrome Bookmarks
Created February 11, 2012 02:52
Google Chrome书签备份
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1328913706" LAST_MODIFIED="1328926452" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Bar</H3>
<DL><p>
@gotnix
gotnix / IBM ThinkPad E40 0578AB3 Linux Kernel 3.2.1-r2
Created February 12, 2012 04:34
Linux/x86_64 3.2.1-gentoo-r2 Kernel Configuration
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 3.2.1-gentoo-r2 Kernel Configuration
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
@gotnix
gotnix / install KDE on Gentoo
Created February 12, 2012 15:05
Gentoo install kde
# http://gentoo-install.com/kde
XUSE="truetype X new-login xorg xscreensaver xv xcomposite xinerama opengl aiglx"
IMAGEUSE="jpeg gif tiff png svg pdf"
MEDIAUSE="alsa mad vidix asf win32codecs dvd cdr dvdr mp4 aac x264 xvid nsplugin mp3 real"
GENERAL="samba java bzip2 symlink sqlite spell xml"
SYSTEM="hal fam dbus aoss threads udev argument upower extras"
NET_SEC="ssl ipv6 md5"
NOTUSE="-gtk -gnome -arts"
KDEUSE="kde kdeenablefinal qt3 qt4 rdesktop"
@gotnix
gotnix / etcmake.conf
Created February 15, 2012 15:31
Gentoo /etc/make.conf
# These settings were set by the catalyst build script that automatically
# built this stage.
FEATURES="ccache"
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
#CFLAGS="-O2 -pipe"
CFLAGS="-march=core2 -mtune=generic -O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
@gotnix
gotnix / update kernel tips
Created February 15, 2012 17:21
gentoo kernel update to 3.2.6
* Kernel compiled successfully!
*
* Required Kernel Parameters:
* real_root=/dev/$ROOT
*
* Where $ROOT is the device node for your root partition as the
* one specified in /etc/fstab
*
* If you require Genkernel's hardware detection features; you MUST
* tell your bootloader to use the provided INITRAMFS file. Otherwise;
@gotnix
gotnix / GenKernel 3.2.6
Created February 16, 2012 16:47
generated via genkernel,正确的配置
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.2.6-gentoo Kernel Configuration
#
CONFIG_64BIT=y
# CONFIG_X86_32 is not set
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
@gotnix
gotnix / strace gogoc
Created February 19, 2012 14:19
gogoc 不能创建虚拟网卡
Script started on Sun 19 Feb 2012 09:57:00 PM CST
]0;root@imtz:~[?1034himtz ~ # strace /etc/init.d/gogoc start
execve("/etc/init.d/gogoc", ["/etc/init.d/gogoc", "start"], [/* 40 vars */]) = 0
brk(0) = 0x61e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f113c88d000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/lib64/tls/x86_64/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls/x86_64", 0x7fffb76bbc70) = -1 ENOENT (No such file or directory)
open("/lib64/tls/libutil.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/lib64/tls", 0x7fffb76bbc70) = -1 ENOENT (No such file or directory)
@gotnix
gotnix / KS_4_XenServer-VM.conf
Created April 20, 2012 10:30
KickStart script file for Web Server on Citrix XenServer VM.
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use CDROM installation media
cdrom
@gotnix
gotnix / http_serv.go
Created April 22, 2012 10:52
Share you directory via http server by golang.
package main
import(
"net/http"
"fmt"
)
func main() {
var (