my book list

  • Unix网络编程 卷1: 套接字联网API(在读)

  • Unix网络编程 卷2: 进程间通讯(在读)

  • Shell脚本编程学习指南(在读)

  • 实用Common Lisp编程(推荐指数 ★★★★★ 已读)

  • Unix编程艺术(推荐指数 ★★★★★ 已读,需再读)

  • Python基础教程(已读,需再读)

  • Unix环境高级编程(只读一小部分)

  • 深入理解Linux内核(粗略的翻完,需再读)

  • 黑客与画家(推荐指数 ★★★★★已读毕,一些思想很好)

  • Linux设备驱动程序(需从头到尾仔细的走一边,未读完)

  • 程序员的数学(未读)

  • 编程之美(推荐指数 ★★★★ 读过一些)

  • C专家编程(推荐指数 ★★★★★ 已读三遍以上,需再读)

  • 深入理解计算机系统(对感兴趣的章节大体翻了翻)

  • C和指针(未读完,C专家编程比此书更值得读)

  • 计算机程序设计艺术 第一卷基本算法(太难,没有怎么看)

  • 程序算法与技巧精选()

  • 加密与解密(基本上没有用过里面的东西,只是原先感兴趣)

  • C++ Primer(我把这书当成工具书,需要的时候翻翻)

  • Effect C++(英文版,需要的时候翻翻)

  • 编程珠玑Programming Pearls(看小部分)

  • 数学之美(已看大部分)

  • 学习vi和Vim编辑器(影印版)(已看)

  • 你不可不知的50个数学知识(未看)

  • 思考的乐趣-Matrix67数学笔记(读某些,大部分还没看)

  • 数学大师-从芝诺到庞加莱(对数学感兴趣的同学可以了解下数学大师的人品啊成就啊人生啊)

ssh tunel

引子:
最近火车票抢票插件问题引起的连锁效应,导致github访问出现问题,不管是GFW墙了github
还是github墙了China,总之结果是,无法更新github上的blog了(pull和push都失败).

使用ssh隧道可以访问墙外的网站,那么是否使用同样(或类似的原理)来访问github的项目呢?
为此,对ssh tunel进行了一番搜索研究,以下是一些收集的信息:

  • ssh -f -NC -D7070 username@sample.com 浏览器翻墙用的命令
    -f 后台运行
    -N 仅作端口转发,不执行任何命令
    -C 压缩数据
    -D 指定动态端口

TODO:
如何通过ssh隧道来进行git操作(pull,push and so on)

lisp

学习资料:

在 ILC 2002 大会上前Lisp大神,当今的Python倡导者Peter Norvig,由于某些原因,做一个类似于马丁路德在梵蒂冈宣扬新教的主题演讲,因为他在演讲中大胆地声称Python就是一种Lisp。

讲完后进入提问环节,出乎我意料的是,Peter点了我过道另一侧,靠上面几排座位的一个老头,他衣着皱褶,在演讲刚开始的时候踱步进来,然后就靠在了那个座位上面。

这老头满头凌乱的白发,邋遢的白胡须,像是从旅行团中落下的游客,已经完全迷路了,闲逛到这里来歇歇脚,随便看看我们都在这里干什么。我的第一个念头是,他会因为我们的奇怪的话题感到相当失望;接着,我意识到这位老头的年纪,想到斯坦福就在附近,而且我想那人也在斯坦福 —— 难道他是……

“嗨,John,有什么问题?” Peter说。

虽然这只是10个字左右的问题,我不会假装自己记住了Lisp之父约翰麦卡锡说的每一个字。他在问Python程序能不能像处理数据一样,优雅地处理Python代码。

“不行。John, Python做不到。” Peter就回答了这一句,然后静静地等待,准备接受教授的质疑,但老人没有再说什么了。此时,无语已胜千言

Emacs org mode

网络资料


解决导出pdf无法显示中文问题

  • 安装xetex
    yum install texlive-xetex-bin.x86_64

  • 安装其他缺少的包
    yum install texlive-xetex-def
    yum install texlive-xltxtra
    yum install texlive-xecjk
    yum install texlive-wrapfig

  • 问题: LaTeX Error: Encoding scheme EU1 unknown.
    解决: 使用yum安装yum install 'tex(eu1enc.def)'yum install texlive-euenc,ok问题解决,可以生成中文pdf了.
    参考: fedora 17 ctex 中文

下划线转义问题

  • _为了不要转义下划线,如my_test中的下划线保留,需在org文件头部加入#+OPTIONS: ^:nil_

参考文章:



create flowchart by graphviz

Fedora

  1. yum install graphviz

  2. write test.dot as below:

    graph example1 {
    Server1 -- Server2
    Server2 -- Server3
    Server3 -- Server1
    }
    
  3. dot -Tpng test.dot -o test.png
    dot -Tsvg test.dot -o test.svg

  4. rsvg-convert -f pdf -o test.pdf test.svg convert svg to pdf

Reference

List my linux software

更新历史



























日期 版本 详细
2015-01-26 1.3 FC21
2014-06-11 1.2 FC20
2013-01-19 1.1 加入前序,排版,增加项目
2013-01-16 1.0 第一版, FC18

使用历史

约在04年左右开始接触Linux,印象中使用的应该是国内的红旗;
但后续的日子,基本上没有再接触了. 直到在上海工作,闲来无事,在网上写了个地址,然
后收到张A国寄来的Ubuntu光盘,就又重新接触了,大约是08年吧;之后有使用过Fedora,
工作中也使用过centos(主要用作编译服务器,ftp服务,版本仓库),其他的也有用过,
如Mint(作Linux kernel编译玩具),BackTrack(用于信息安全方面的系统,基本不会用);
近半年来,回了南方,换了工作,有机会全身心投入Linux世界,于是乎把公司以及家里的
系统kill掉,全换成了Fedora17,前天升级到fc18.

这里罗列Linux(Fedora)下常用的一些工具,主要作为备忘,别无他目.

工具列表

  • 远程桌面: rdesktop, teamviewer

  • 抓包工具: wireshark

  • 虚拟机: Virtual Box、kvm

  • 办公软件: LibOffice(浏览工作中的文档)

  • 浏览器: Firefox(插件vimperator,autoproxy)、Chrome(插件vimium,TunnelSwitch)

  • 邮件: Thunderbird

  • 文件管理: gnome-commander(类似于windows下的TotalCommander,但差很多)

  • 版本控制: git(写blog和查看开源代码时使用)、svn(工作时使用)

  • 代码编辑器: VIM、Emacs

  • 十六进制文件编辑: bless, hexdump -C, vim -b

  • 笔记: Emacs org mode, markdown

  • 流程图: graphviz dot (其他工具 PlantUML bouml)

  • 博客: github+jekyll

  • 下载: wget

  • 墙外: ssh or goagent + firefox autoproxy, 鲨鱼VPN

  • 数学软件: maxima

  • 翻译: stardict

  • IRC: irssi、xchat

  • 即时通(IM): skype

  • RSS: greader、liferea

  • 文档转换: pandoc(convert documents to pdf)

  • 图片编辑: gimg shutter ImageMagick

  • 视频播放: smplayer

  • 其他: 系统监测-Conky

Install on FC20

# 2014-06-11 Create by Dennis

yum install -y rdesktop

# for gvim
yum install -y vim-X11 vim-common vim-enhanced vim-minimal
# for vim
yum install -y cscope ctags 

# for git svn g++  
yum install -y git svn gcc-c++ 

# for thunderbird, download the rpm package from website
#yum install thunderbird-24.5.0-1.fc20.x86_64.rpm 
yum install -y thunderbird

# for jekyll  
yum install -y ruby-devel
# it will take several minutes to finish
gem install jekyll
gem install rake
# for js
yum install -y nodejs

# for graphviz
yum install -y graphviz

# for teamviewer, download rpm package from website
# yum install teamviewer_linux.rpm 

yum install sqlite-devel

yum install clang

# for dict
yum install -y stardict

# for ImageMagick
yum install -y ImageMagick

For pandoc generate pdf

yum install pandoc 
yum -y install texlive texlive-latex texlive-xetex
yum -y install texlive texlive-latex texlive-xetex
yum -y install texlive-collection-latex
yum -y install texlive-collection-latexrecommended
yum -y install texlive-xetex-def
yum -y install texlive-collection-xetex
#Only if needed:
#yum install texlive-collection-latexextra
yum install texlive-titlesec
yum install texlive-titling
yum install texlive-lastpage
yum install "tex(eu1enc.def)"
yum install texlive-xetex-def
yum install texlive-xecjk

Install virtualbox

# for virtualbox, download rpm package from website
yum install VirtualBox-4.3-4.3.12_93733_fedora18-1.x86_64.rpm
yum install dkms
/etc/init.d/vboxdrv setup

# **trouble shoot**
#
# [root@indigo kernel]# /etc/init.d/vboxdrv setup  
# Stopping VirtualBox kernel modules                         [  OK  ]  
# Uninstalling old VirtualBox DKMS kernel modules            [  OK  ]  
# Trying to register the VirtualBox kernel modules using DKMSError! echo  
# Your kernel headers for kernel 3.14.5-200.fc20.x86_64 cannot be found at  
# /lib/modules/3.14.5-200.fc20.x86_64/build or /lib/modules/3.14.5-200.fc20.x86_64/source.  
#                                                            [FAILED]  
#   (Failed, trying without DKMS)  
# Recompiling VirtualBox kernel modules                      [FAILED]  
#   (Look at /var/log/vbox-install.log to find out what went wrong)
#
yum instal kernel
yum instal kernel-devel
reboot
# then select the latest kernel to boot the os

# add dennis to vboxusers group, support virtualbox USB (default root)
gpasswd -a dennis vboxusers
[dennis@localhost ~]$ groups $USER
dennis : dennis vboxusers

Install rar

wget -c http://www.rarsoft.com/rar/rarlinux-x64-5.1.0.tar.gz
tar xvf rarlinux-x64-5.1.0.tar.gz
cd rar
make

Install smplayer

rpm -ivh http://rpm.livna.org/livna-release.rpm
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
yum -y install smplayer
yum -y install mplayer-gui

参考链接

vim english dict

vim英文字典

  • 下载字典
    地址:http://www.vim.org/scripts/script.php?script_id=195

  • 解压缩所需字典文件
    tar xvf ~/Downloads/engspchk.tar.gz CVIMSYN/engspchk.dict

  • 使用vim整理成字典文件
    vim CVIMSYN/engspchk.dict
    删除前面三行: gg3dd
    删除行首GoodWord单词: :%s/^GoodWord\t//g
    整理成每个单词占一行: :%s/\t/ /g
    删除最后一行: Gdd
    排序: :sort

  • 拷贝字典文件到指定目录
    mkdir /usr/share/vim/vim73/dict
    cp CVIMSYN/engspchk.dict /usr/share/vim/vim73/dict/english.dict

  • 设置.vimrc文件
    setlocal dictionary+=$VIMRUNTIME/dict/english.dict

  • 英文单词自动补全快捷键
    Ctrl+X Ctrl+K

linux device driver

####[转载]Linux驱动开发学习的一些必要步骤

1. 学会写简单的makefile

2. 编一应用程序,可以用makefile跑起来

3. 学会写驱动的makefile

4. 写一简单char驱动,makefile编译通过,可以insmod, lsmod, rmmod.
在驱动的init函数里打印hello world, insmod后应该能够通过dmesg看到输出。

5. 写一完整驱动, 加上read, write, ioctl, polling等各种函数的驱动实现。
在ioctl里完成从用户空间向内核空间传递结构体的实现。

6. 写一block驱动, 加上read,write,ioctl,poll等各种函数实现。

7. 简单学习下内存管理, 这个是最难的,明白各种memory alloc的函数实现细节。
这是Linux开发的基本功。

8. 学习锁机制的应用,这个不是最难的但是最容易犯错的,涉及到很多同步和并发的问题。

9. 看内核中实际应用的驱动代码。
你会发现最基本的你已经知道了,大的框架都是一样的,无非是read,write,ioctl等函数的实现,
但里面包含了很多很多细小的实现细节是之前不知道的。
这时候就要考虑到很多别的问题而不仅仅是基本功能的实现。
推荐您看2.6.20中integrated的一个驱动kvm,记得是在driver/lguest下,很好玩的,就是Linux下的虚拟机驱动,代码不长,但功能强大。
有能力的可以自己写一操作系统按照要求做成磁盘镜像加载到虚拟机中,然后客户机可以有自己的4G虚拟地址空间。

10. 看完驱动欢迎您进入Linux kernel学习中来。

最简单的方法,跟着ldd(Linux devive driver)做一遍

来源:
http://linux.chinaitlab.com/driver/745132.html