自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(33)
  • 资源 (2)
  • 收藏
  • 关注

原创 iptables的一些资料

1. http://man.chinaunix.net/network/iptables-tutorial-cn-1.1.19.html2. http://blog.csdn.net/trochiluses/article/details/94910693. $ man iptables

2014-01-20 22:32:57 562

原创 《Linux内核设计与实现》阅读有感

最近在研究《Linux内核设计与实现》这本书,虽然大四时候上Linux内核的课用的就是这本教材,但是当时也只是浅尝辄止,只学得一点皮毛。最近在翻看第二遍的时候,发现好多有趣的知识点之前都遗漏了,就比如说“内核数据结构”这章,讲的是内核中包括链表,栈,队列,红黑树等数据结构。昨天睡前把链表这节浏览了一遍,今天晚上想写个读书笔记却发现自己完全没有理清链表的实现方式,list_add /

2013-11-04 23:57:59 673

原创 Nexus 7安装Android系统

下载Android镜像https://dl.google.com/dl/android/aosp/mantaray-jdq39-factory-d79f489e.tgz解锁设备        1. 关机        2. 按住音量减键和电源键,直到进入fastboot模式        3. 连接上PC        4. PC端输入sudo fastboot

2013-10-19 00:40:39 1048

原创 Nexus 7安装Ubuntu Touch

声明此处为Ubuntu官方的安装教程,经测试发现有些地方不太奏效,所以在此记录一下实际的安装过程。测试用设备为ASUS Nexus 7,代号为grouper,Factory Image为Android 4.2.2 (JDQ39)。安装完成之后Nexus 7上的系统为Ubuntu 13.10 (saucy) Touch版。安装环境PC端系统为Ubuntu 13.04

2013-10-19 00:13:38 1983

原创 #pragma pack()

适用情景:    struct,union,class等复合(aggregate)数据类型语法:#pragma pack(n) // n = 1, 2, 4, 8, 16struct S { // 注意:此处必须是结构体的声明 short a; long b; char c;

2013-09-23 23:58:12 550

原创 STM32 USB模块

基于STM32 Datasheet (RM0008)上USB部分的Block Diagram谈谈个人的理解:

2013-09-22 09:52:55 1566

原创 Gentoo安装与配置 - Part 1

Fedora17用了2年多了,想着也该换个发行版用用了,当初还是个菜鸟的时候,听说Gentoo什么都要从源码编译,没敢去用,现在稍微有了点积累,想回过头来再试试。由于是初次接触Gentoo(尽管以前折腾过LFS),预计工作量会比较庞大,也会遇到各种各样的问题,所以现在开始做个分段记录(Part 1 - Part ?)。

2013-09-19 20:16:22 594

原创 总结代码阅读方面的tips

最近在阅读一份固件代码,总结了一些tips:1. 从main()开始逐层向下分析,经过协议层和硬件抽象层,最后到设备寄存器的读写。2. 关注头文件中数据结构的定义,因为读到其他部分代码的时候都要refer一下这些定义。比如一个抽象USB设备的struct,一个抽象Endpoint的struct等。

2013-09-16 16:26:58 531

转载 “回车”与“换行”

关于“回车”(carriage return)和“换行”(line feed)这两个概念的来历和区别。在计算机还没有出现之前,有一种叫做电传打字机(Teletype Model 33)的玩意,每秒钟可以打10个字符。但是它有一个问题,就是打完一行换行的时候,要用去0.2秒,正好可以打两个字符。要是在这0.2秒里面,又有新的字符传过来,那么这个字符将丢失。于是,研制人员想了个办法解决这个问题,就

2013-09-12 17:24:18 509

转载 Synchronous/Asynchronous/Blocking/Non-blocking I/O

来自:

2013-09-11 21:49:53 598

原创 vim中match命令指定的多个pattern的覆盖问题

Q:~/.vimrc中的片段:    "规定的第1个pattern:    match Title /=== .* ===/    “规定的第2个pattern:    match Comment /\/\/ .*$/重新打开编辑的文件发现只有第二个pattern有效。A:使用syntax match或2match & 3match命令。

2013-09-08 22:28:34 2444

原创 解决gvim缺少Linux环境下vim的一些特性

块选择不能用?按了变成了粘贴?注释掉_vimrc中的behave msvim就能马上回到vim原有的行为模式。_vimrc文件就在Vim的安装目录下,比如我的在D:/Program Files/Vim/_vimrc或者选择工具栏的“编辑”下的"启动设定"也能打开_vimrc

2013-08-23 16:21:51 517

原创 Fedora的Network-Manager真难用

Fedora的Network-Manager真难用,有时候擅自建个网络连接叫Auto_Ethernet,建个能上网的也就算了,结果配置又不对;有时候手动配置了个连接又启用不了;算了,干脆停用Network-Manager:    $ sudo systemctl disable Network_Manager.service手动配置网络连接:网络连接的配置文件在/etc/s

2013-04-16 10:31:33 2361

原创 重定向(redirect)与管道(pipe)

基本概念(具体参见APUE):一个进程控制块中有多个文件描述符(file descriptor),如:fd0:标准输入fd1:标准输出fd2:标准输错fd3:自定义fd4:自定义...每个文件描述符对应一个指向file table的指针。重定向使用dup()/dup2()系统调用,dup()的原型为:int dup(int filedes)

2013-04-05 01:56:02 1415

原创 Shell编写心得

(1).Shell编写需要涉及到许多系统调用,如:    fork(), exec(), wait()而系统调用失败时,一般都不输出错误信息,所以在代码中包含错误处理对debug非常重要,如:    if (execlp("ls", "ls", (char *)0) == -1) {        perror("execlp");        exit(EXIT_FAI

2013-03-30 22:04:28 613

原创 Fedora安装字体

(以DejaVu Sans Mono为例)下载DejaVuSansMono.ttf,保存在~/Downloads下$ mkdir /usr/share/fonts/monospace$ cd /usr/share/fonts/monospace$ cp ~/Downloads/DejaVuSansMono .$ mkfontscale$ mkfontdir$ f

2013-03-30 15:26:15 637

原创 vim编辑器非常用命令汇总

输入vi时自动使用vim:    alias vi=vim编辑多个文件并相互切换:    vi file1 file2 ...    :next    // 切换到下一个文件    :previous    // 切换到上一个文件    :first    // 切换到第一个文件    :last    // 切换到最后一个文件    :args    // 显

2013-03-29 21:19:05 550

原创 MySQL常用语句笔记

mysql> SHOW DATABASES;mysql> CREATE DATABASEmydb;mysql> USE mydb;mysql> SHOW TABLES;mysql> CREATE TABLE mytable (         -> name VARCHAR(20),         -> genda CHAR(1),

2013-03-13 21:10:24 525

原创 从源码安装mysql-5.1.67

首先参考iteye上的一篇博文:    http://haiouc.iteye.com/blog/1779771从这个台湾的源下载源码包比较快:    http://ftp.nchu.edu.tw/Unix/Database/MySQL/Downloads/MySQL-5.1/其中编译前的配置命令:    ./configure --prefix=/usr/local/my

2013-03-12 23:37:02 883

原创 编译Linux内核时出现“fatal error: linux/netfilter/xt_dscp: No such file or directory”

编译Linux内核时出现“fatal error: linux/netfilter/xt_dscp: No such file or directory”。下面开始查找原因。第一步:找到编译器报错的.h和.c文件,发现linux-3.8.1/include/uapi/linux/netfilter下有2个类似的文件:        "xt_DSCP.h" 和 "xt_DSCP.

2013-03-07 02:13:23 9248 2

原创 Recover Grub2 using a LiveCD(for Fedora 17)

$ su$ cd /media$ mkdir tmp                                                                   # make a temporary directory to mount /boot$ mount /dev/sda3 tmp

2013-01-10 07:58:52 563

原创 [Unresolved Problems]

1. 递归实现单向链表翻转2. 加入一个mailing list3. `ln -s /mnt/lfs/tools /' 和 `ln -s /mnt/lfs/tools/ /' 有什么区别

2013-01-08 00:30:28 326

转载 Context(上下文)

In computer science, a task context (process, thread) is the minimal set of data used by this task that must be saved to allow a task interruption at a given date, and a continuation of this task at t

2012-12-29 14:23:35 278

原创 [g++] undefined reference to (a constructor)

编译的时候.C文件没加?

2012-12-13 04:41:09 415

原创 Latex Error: ! I can't write on file `xxx.log'.

xxx.tex不能保存在github之类的网络共享文件夹内,需移到本地磁盘。

2012-06-06 14:57:37 7186

转载 fedora安装flash plugin

sudo rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpmsudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux sudo yum install flash-plugin nspluginwra

2012-06-02 15:04:53 626

原创 ubuntu静态网络配置

//配置静态IP,子网掩码,网关sudo vi /etc/network/interfacesauto loiface lo inet loopbackauto eth0iface eth0 inet staticaddress 211.80.61.54netmask 255.255.255.0gateway 211.80.61.254//配置NDSsudo

2012-06-01 22:23:34 441

转载 linux /boot目录

/bootThis directory contains everything required for the boot process except for configuration files not needed at boot time and the map installer. Thus, the /boot directory stores data that is us

2012-04-28 15:22:29 2879

转载 linux /bin目录

/binThe bin directory contains several useful commands that are of use to both the system administrator as well as non-privileged users. It usually contains the shells like bash, csh, etc and comm

2012-04-28 13:47:10 1210 1

转载 linux /etc目录

/etcThis is the nerve center of your system, it contains all system related configuration files in here or in its sub-directories. A "configuration file" is defined as a local file used to contr

2012-04-25 18:01:26 813

转载 linux /usr目录

/usr/usr usually contains by far the largest share of data on a system. Hence,this is one of the most important directories in the system as it contains all the user binaries, their documentation, l

2012-04-24 15:07:06 1751

转载 Linux Kernel & Distributions

Linux的内核版本Linux内核的版本号分为主版本号、次版本号和扩展版本号等。根据稳定版本、测试版本和开发版本定义不同版本序列。稳定版本的主版本号用偶数表示,例如:2.2、2.4、2.6。每隔2~3年启动一个Linux稳定主版本号。紧接着是次版本号,例如:2.6.30、2.6.31、2.6.32。次版本号不分奇偶数,顺序递增。每隔1~2个月发布一个稳定版本。然后是升级版本号,

2012-04-15 09:17:58 675

原创 ubuntu修改mac地址

暂时修改:ifconfig eth0 downifconfig eth0 hw ether A4:BA:DB:ED:BD:1F(网卡的mac地址)ifconfig eth0 up永久修改:vi /etc/init.d/rc.local在文件末输入上述三行,:wq 保存退出。

2012-04-14 22:28:10 338

Learning_Perl(小骆驼书)

经典的小骆驼书,初学Perl的经典手册, pdf格式,英文原版

2012-09-16

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除