小工具介绍: XBindKeys, Global Menu

小高子一直都是一个近乎狂热的键盘控, 寻找各种可以通过键盘实现的操作. 自从结识了GNOME Do这个神器一般的软件, 启动各种程序再也没有用到鼠标. 不过有一点是GNOME Do办不到的, 当Firefox有多个账户时, 这时通过GNOME Do启动Firefox就有点混乱, 每次必须通过冗长的命令行在多个Firefox账户间切换. 可不可以把这些命令绑定到键盘上呢? 那就是今天的第一位主角了: XBindKeys.
Read the rest of this entry »

No Comments

字符串与16进制转换脚本

发个脚本上来耍耍,也许会对你有用。

功能:实现字符串和16进制之间的转换。

只要有python基础的人都能写出来。

发出来是只是为了需要的时候,能快速找到,君以为如何?
Read the rest of this entry »

Tags: , ,

No Comments

查询某库所有表的前x条记录

#本程序用于查询某个数据库里面的所有表的前50条记录
#主要利用查询系统库information_schema来达到查询所有表/每个表的所有字段
#最后遍历所有表,查询前50条记录并显示出来.
#Mysql大于5.0版本才有information_schema库
#oyea9le@gmail.com
#2010.7.16
Read the rest of this entry »

Tags: , ,

No Comments

Linux下登录3389

黑色的夜里,用windows上未知服务器的3389怕中马,我们用Linux来登录.

命令:

# rdesktop -u administrator -p the_password -a 8 -r disk:haha=/root/Desktop/win_bin/ xx.yy.zz.aa

参数说明: Read the rest of this entry »

Tags: ,

2 Comments

automake创建Makefile

autoconf/automake主要用于创建makefile,本文主要介绍一下automake的简单用法。

Ubuntu下安装automake:

sudo apt-get install automake

即可安装automake的相关工具。
Read the rest of this entry »

2 Comments

Linux下各种buffer的比较

类型 默认大小[1] 存储位置 操作函数 备注
标准I/O流[2] File BUFSIZ[3] (8192) 或者 st_blksize[4] (4096) User Space stat(2), setvbuf(), fflush() 每一个标准I/O流都有一个buffer
stdin stdin->_IO_buf_end[5] - stdin->_IO_buf_base (1024)
stdout stdout->_IO_buf_end - stdout->_IO_buf_base (1024)
stderr 1
TCP Receive Buffer SO_RCVBUF[6] (87380) Kernel Space getsockopt(), setsockopt() 每一个socket都有两个buffer
Send Buffer SO_SNDBUF (16384)
UDP[7] Receive Buffer SO_RCVBUF (114688)
Send Buffer SO_SNDBUF (114688)

Read the rest of this entry »

Tags: , ,

No Comments

转换多个JPG文件到PDF文件

最近需要将大量JPG格式的图片全部转换到一个PDF文件里, Google之后发现Window$下清一色的收费软件, 即使有试用版, 也会带有很多限制. 而Linux下则从来都不缺乏这种实用的小工具, 在bitPrison.net的一篇文章中介绍了通过ImageMagick中的convert组件进行转换的方法, 经过尝试, 发现这种方法效率很低, 并且会占用很高的CPU. 该篇文章后面的评论提供了一种更优的方法, 使用PDFjam包中的pdfjoin命令完成, 具体步骤如下:
Read the rest of this entry »

No Comments

calibre: EPUB书籍转换工具

EPUB是由IDPF (International Digtial Publishing Forum) 制定的电子书官方标准, 目前在很多平台上都有广泛应用, 尤其是移动设备. 大部分的移动设备都支持显示EPUB标准的电子书, 如iPad、iPhone、Android系列手机等, 不过也有例外, 那就是大名鼎鼎的Kindle. 目前EPUB书籍的种类还不是很多, 因此需要一个转换工具来帮助从其它常用的格式转换过来.
Read the rest of this entry »

Tags:

2 Comments

脚本挑战_Vigenere加密解密

这是一个很古老的古典加密算法。不过,在这儿呢,我做了少许修改。

示例:

码表:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

假设明文为:HelloWorldREnewjoy

密钥为:abc

Read the rest of this entry »

Tags: , ,

4 Comments

Configure Network Cards on BT4

从国外论坛找到的,虽然是以bt4来讲的,但是应该适合大多数的版本。

语言很简单,就不用翻译了。

要点:

1、如何手动设置IP地址和子网掩码?

2、如何设置默认路由?

3、如何设置DNS?

因此,它做的事情,就是在windows里面,点tcp/ip右键,然后“手动设置IP”。

Configure Network Cards, How to

So you have Backtrack running installed on a HDD, you can now configure your cards to use the network. You can also do this exactly the same if you are running the distro from the CD, but your settings will not be saved as the CD is a read only medium. There are plenty of different ways to configure these wired cards and plenty of tools to do it. What I am showing here is the generic Linux commands which should be the same for other distro’s.

Read the rest of this entry »

Tags: , , ,

2 Comments