VFS: Mounted root (ext4 filesystem) readonly

参考 http://forums.gentoo.org/viewtopic-t-880313-start-0.html

Problem:

dmesg

代码:
EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) readonly on device 8:2.
Freeing unused kernel memory: 396k freed
Write protecting the kernel text: 4244k
Write protectiong the kernel read-only data: 1664k
init-early.sh used greatest stack depth: 6696 bytes left

继续阅读

vi Complete Key Binding List

vi Complete Key Binding List
http://hea-www.harvard.edu/~fine/Tech/vi.html

This is not intended as a tutorial. It is a reference on what every vi key binding does, followed by some useful vi tricks and tips. An expert will probably know most of these already, but an intermediate vi user will find valuable information, and even an expert may learn a thing or two.
complete key binding reference

Key Action Followed by
a enter insertion mode after current character text, ESC
b back word
c change command cursor motion command
d delete command cursor motion command
e end of word
f find character after cursor in current line character to find
g UNBOUND
h move left one character

继续阅读

Posted in Vim.

Vim 杀手级 Tip: 快速处理配对标点符号中的文本

http://linuxtoy.org/archives/killer-vim-tip.html
这称得上是一个 Vim 的杀手级 Tip,利用该 Tip,你可以快速处理 ‘、”、()、[]、{}、 等配对标点符号中的文本内容,包括更改、删除、复制等。

ci’、ci”、ci(、ci[、ci{、ci< – 分别更改这些配对标点符号中的文本内容
di'、di"、di(、di[、di{、di< – 分别删除这些配对标点符号中的文本内容
yi'、yi"、yi(、yi[、yi{、yi< – 分别复制这些配对标点符号中的文本内容
对于经常用 Vim 写代码的朋友来说,善用此 Tip 将极大的提高编码效率。

Posted in Vim.

gdb调试器用法

http://code.google.com/p/ldd6410/wiki/GDBDebug

GDB是GNU开源组织发布的一个强大的UNIX下的程序调试工具,GDB主要可帮助工程师完成下面4个方面的功能:

  • 启动程序,可以按照工程师自定义的要求随心所欲的运行程序。
  • 让被调试的程序在工程师指定的断点处停住,断点可以是条件表达式。
  • 当程序被停住时,可以检查此时程序中所发生的事,并追索上文。
  • 动态地改变程序的执行环境。

不管是调试Linux内核空间的驱动还是调试用户空间的应用程序,掌握gdb的用法都是必须。而且,调试内核和调试应用程序时使用的gdb命令是完全相同的,下面以代码清单22.2的应用程序为例演示gdb调试器的用法。

继续阅读

8 ways to share your git repository

This blogpost provides a summary of different ways to share a git repository. Depending on your needs you can opt for different solutions.

Repository Pro Con Controlling Access Create Repositories
File share No network access required Not internet friendly Using filepermissions Needs preparation per project on the share
Git daemon Fast git protocol Not internet friendly port no good permission control. Read by default, Write can be enabled , but only anonymous per project needs to be blessed
Plain SSH server Allows good security Not internet friendly port, requires account creation per user on server Uses filepermissions per project inited
SSH server git-shell Enhancement of Plain SSH Server scenario Not internet friendly port, requires account creation per user on server Uses filepermissions per project inited
Gitosis Adds good remote management of users and repositories, only requires one system account Not internet friendly port Uses gitosis-config file No server initalisation, only config is needed
Apache http Falls back to standard apache config, only requires one system account, internet friendly Slightly overhead Uses htpasswd per project inited
Apache http + gitweb Falls back to standard apache config, only requires one system account, internet friendly, adds nice view of repository Slightly overhead, read-only access Uses htpasswd per project inited
github Internet accessible, easy to use webinterface Hosted externally Managing sshkeys Web interface

VimRepress : managing wordpress blog from vim

下载链接 http://www.vim.org/scripts/script.php?script_id=3510

配置:
” Configure: Add blog configure into your .vimrc

” let VIMPRESS=[{‘username’:’user’,
” \’password’:’pass’,
” \’blog_url’:’http://your-first-blog.com/&#8217;
” \},
” \{‘username’:’user’,
” \’password’:’pass’,
” \’blog_url’:’http://your-second-blog.com/&#8217;
” \}]

常见问题:
1.vim版本不支持python
debian : apt-get install vim-nox
This package contains a version of vim compiled with support for
scripting with Perl, Python, Ruby, and Tcl but no GUI.

2.BlogList error:“An error has occured”
描述:远端wordpress网站没有打开XML-RPC服务
解决方法:在后台->设置->撰写->启用XML-RPC

Posted in Vim.

tmux vs screen

# split windows like vim
# vim’s definition of a horizontal/vertical split is reversed from tmux’s
bind s split-window -v
bind v split-window -h

# move around panes with j and k, a bit like vim
bind j select-pane -D
bind k select-pane -U
bind h select-pane -L
bind l select-pane -R

# resize panes like vim
# feel free to change the “1” to however many lines you want to resize by, only one at a time can be slow
bind < resize-pane -L 1
bind > resize-pane -R 1
bind – resize-pane -D 1
bind + resize-pane -U 1

# bind : to command-prompt like vim
# this is the default in tmux already
bind : command-prompt

# vi-style controls for copy mode
setw -g mode-keys vi
setw -g mode-mouse on