
Linux
karlzheng
这个作者很懒,什么都没留下…
展开
-
windows下通过VNC客户端软件远程连接Ubuntu14.04的桌面共享服务vino
http://www.ubuntukylin.com/ukylin/forum.php?mod=viewthread&tid=8631https://bugs.launchpad.net/ubuntu/+source/vino/+bug/1290666解决方案如下:1、安装dconf-editorsudo apt-get install dconf-editor2、用Dco原创 2014-09-04 17:02:25 · 5771 阅读 · 0 评论 -
ARM汇编中的ldr和adr的区别及其在uboot中相关源码的分析
http://blog.youkuaiyun.com/ce123/article/details/7277114ARM汇编有ldr指令以及ldr、adr伪指令,它们都可以将标号表达式作为操作数,下面通过分析一段代码以及对应的反汇编结果来说明它们的区别。[plain] view plaincopyldr r0, _start adr r0, _start ldr r0,转载 2012-02-23 20:23:12 · 3818 阅读 · 0 评论 -
changer KDESVN external diff program
kdesvn original external diff program:kompare -on -kdiff3 %s1 %s2 %tkdiff3 %o %m %n -o %tnow follow the url:http://www.scootersoftware.com/support.php?zz=kb_vcs#kdesvn原创 2012-02-22 11:10:36 · 4746 阅读 · 0 评论 -
vim或sed删除文本文件中所有的中文字符
vim:http://www.douban.com/group/topic/9735267/:%s/\v[^\x00-\xff]+//g sed:http://7056824.blog.51cto.com/69854/178940LANG=C sed -r "s/[\x81-\xFE][\x40-\xFE]//g" file原创 2012-01-11 21:13:40 · 9239 阅读 · 0 评论 -
simg2img.py
#!/usr/bin/env python#encoding:utf8#===============================================================================## FILE: simg2img.py# # USAGE: ./simg2img.py system.img #原创 2011-10-18 20:21:29 · 8555 阅读 · 1 评论 -
Dash与Bash的语法区别
http://www.igigo.net/archives/169如今Debian和Ubuntu中,/bin/sh默认已经指向dash,这是一个不同于bash的shell,它主要是为了执行脚本而出现,而不是交互,它速度更快,但功能相比bash要少很多,语法严格遵守POSIX标准,下面简要列举下从bash迁移到dash一般需要注意的问题1.定义函数bash: fu转载 2011-12-10 14:08:24 · 4943 阅读 · 0 评论 -
Python for Bash scripters: A well-kept secret
http://magazine.redhat.com/2008/02/07/python-for-bash-scripters-a-well-kept-secret/Python for Bash scripters: A well-kept secretby Noah GiftHey you, ya you! Do you write Bash scrip转载 2011-12-10 14:06:58 · 6003 阅读 · 0 评论 -
use python in vim script of ~/.vimrc
function! My_Save_CompareFileName() let str = expand("%:p") let str = s:Escape(str) execute ":!echo '".str."' > /dev/shm/beyond_compare_file_a"endfunctionnmap ba :call My_Save_CompareFileName原创 2011-12-01 22:50:27 · 6012 阅读 · 0 评论 -
truecrypt开机自动挂载
http://www.sectop.com/?p=122 truecrypt.exe /q /lT /p123456 /cy /v "e:\my.tc" 把E盘上的my.tc文件,以密码:123456加载到T盘! 具体解释参数: 加载: D:\TrueCrypt\TrueCrypt.exe /q /lX /cn /k "key.dat" /v "D:\my.转载 2011-11-26 12:44:19 · 8242 阅读 · 0 评论 -
imap send email by python
import imaplibimport emaildef extract_body(payload): if isinstance(payload,str): return payload else: return '\n'.join([extract_body(part.get_payload()) for part in payload]原创 2011-11-02 18:57:26 · 7025 阅读 · 1 评论 -
bashrc on May 15,2010
bashrc in googlecode is:http://code.google.com/p/usefulshellscript/source/browse/trunk/mylinuxconfig/bashrc# some more ls aliasesunalias lsalias ls='ls --color=tty '#alias ls='ls --color '原创 2010-05-15 21:21:00 · 5908 阅读 · 0 评论 -
vimrc on May 6th,2010
vimrc on googlecode is:http://code.google.com/p/usefulshellscript/source/browse/trunk/mylinuxconfig/vimrc原创 2010-05-06 16:52:00 · 5951 阅读 · 0 评论 -
android SDL init failure, reason is: No available video device
crontab -e中运行android模拟器出现: SDL init failure, reason is: No available video device解决办法:Try unsetting any environment variables along the line of SDL_*, such as SDL_VIDEODRIVER. If that doesn'原创 2011-10-28 12:28:36 · 8472 阅读 · 0 评论 -
android 解包 AndroidManifest.xml
java -jar AXMLPrinter2,jar AndroidManifest.xmlAPK文件的解包打包和修改http://wenku.baidu.com/view/053c5422af45b307e8719752.html原创 2011-10-28 12:21:51 · 7210 阅读 · 0 评论 -
Powerful Python One-Liners
http://wiki.python.org/moin/Powerful%20Python%20One-LinersPowerful Python One-LinersThis is a page that is devoted to short programs that can perform powerful operations. The ability to转载 2012-04-14 21:11:37 · 3863 阅读 · 0 评论 -
ubuntu9.10自带字典(Dictionary 2.28.1)配置本地词库
http://forum.ubuntu.org.cn/viewtopic.php?f=35&t=243955&start=0用ubuntu没有个字典很不方便,看到系统有自带的就不想试什么星际译王了,在网上找了下,方法如下:首先安装词库:(那个各户断和服务器端不知道是不是必要的,我因为刚开始是用不了所以就都装了)sudo apt-get install dict转载 2012-04-18 21:20:45 · 3646 阅读 · 0 评论 -
tty lock dep
{3}[ 140.014102] ======================================================{3}[ 140.021493] [ INFO: SOFTIRQ-READ-safe -> SOFTIRQ-READ-unsafe lock order detected ]{3}[ 140.029575] 3.0.15 #0{3}[ 1原创 2012-07-05 14:47:56 · 1238 阅读 · 0 评论 -
《生活在Linux中》之:在Vim中使用Emacs
在Vim中使用Emacs原创 2014-04-30 17:30:47 · 1346 阅读 · 0 评论 -
《生活在Linux中》之:prefer function to alias in Bash
在Bash环境中,定义了alias替换有时会产生不是想要的替换:e.g:;而定义function则可以避免这种缺陷。原创 2014-05-03 00:06:19 · 1636 阅读 · 0 评论 -
《生活在Linux中》之:在Bash的Emacs模式中使用Vim
export EDITOR=vimctrl-x ctrl-e原创 2014-04-30 17:33:26 · 2555 阅读 · 0 评论 -
exec text in vim as Shell command!
w !/bin/sh原创 2011-03-22 20:05:00 · 6800 阅读 · 0 评论 -
《生活在Linux中》之: change default IFS in Bash
IFS=$’\n’ #更改IFS值为$’\n’原创 2013-07-23 17:23:33 · 1573 阅读 · 0 评论 -
《生活在Linux中》之:使用Bash就是使用Emacs
使用Bash就是使用Emacs原创 2013-12-08 22:21:05 · 2199 阅读 · 0 评论 -
CapsLock indicator on Ubuntu for Thinkpad
Ubuntu Thinkpad CapsLock 大小写转换指示原创 2013-10-06 00:47:45 · 2038 阅读 · 0 评论 -
Linux下批量转换文件编码
find -iname "*.java" -exec enca {} + |grep -v ASCI |grep -v -i utf |awk -F':' '{print $1}' > /tmp/f for i in $(cat /tmp/f);do echo $i;iconv -f GB2312 -t utf8 $i -o $i;done原创 2013-09-12 20:50:07 · 1465 阅读 · 0 评论 -
欢迎加新浪微博: weibo.com/zhengkarl
微博id: weibo.com/zhengkarl github:https://github.com/karlzheng原创 2012-08-05 15:13:24 · 2303 阅读 · 0 评论 -
史上最全的正则表达式多行匹配例子 from karlzheng@csdn
用vim、sed、awk三种方法实现多行匹配输出原创 2012-10-28 08:41:37 · 2676 阅读 · 0 评论 -
.gitignore 无法忽略文件的解决方法
git rm --cached filename转载 2013-05-28 22:16:01 · 5944 阅读 · 1 评论 -
Truncate a file by using dd command
dd if=/dev/null of=myfile bs=1 seek=1440k转载 2013-07-23 17:18:42 · 1104 阅读 · 0 评论 -
在u-boot C语言文件中使用汇编文件中定义的变量
1.在.s文件中定义赋值:.globl _test_myvar_test_myvar: .word 0xc3e0004cldr r0, =_test_myvarmov r1, r8str r1, [r0] 2.在.c文件中使用:extern ulong _test_myvar;printf("%s %d, _test_myvar:0x%x\n",原创 2012-09-07 14:33:59 · 2674 阅读 · 0 评论 -
介绍一下gnu global,比cscope更方便更快速的索引工具
http://forum.ubuntu.org.cn/viewtopic.php?f=68&t=343460貌似vim众很少用gnu global啊,都只见着emacs众在用,我觉得有必要在vim众中推广一下。gnu global是一个类似cscope的工具,也能提供源文件之间的交叉索引。其独到之处在于,当你生成索引文件以后,再修改整个项目里的一个文件,然后增量索引的过程非转载 2011-10-24 20:50:25 · 15629 阅读 · 0 评论 -
web server:What you get is what I put
#!/usr/bin/env pythonfrom twisted.web import server,resourcefrom twisted.internet import reactorimport twistedimport timeimport mimetypesimport osfrom cStringIO import StringIOclass Root(reso原创 2011-10-21 17:10:07 · 6234 阅读 · 0 评论 -
定制Bash历史命令
在多个bash终端间共享命令历史原创 2010-10-10 15:18:00 · 6245 阅读 · 1 评论 -
Ubuntu安装官方软件库没有的包....
Ubuntu安装官方软件库没有的包....原创 2010-09-25 14:35:00 · 6373 阅读 · 0 评论 -
shell-backward-kill-word in Bash 4.1
add short cut key in ~/.inputrc like below:"/C-j":shell-backward-kill-word原创 2010-09-04 18:56:00 · 6014 阅读 · 0 评论 -
Bash命令行编辑的快捷键
Esc space Set a mark at cursor position. Ctrl-X Ctrl-X Exchange cursor and mark.原创 2010-09-03 08:57:00 · 6069 阅读 · 0 评论 -
在Linux设备驱动程序中打印物理地址的数据内容
pvalue = (unsigned long *)ioremap(addr, 1024);原创 2010-08-26 19:46:00 · 7605 阅读 · 0 评论 -
使用dump_stack()打印出内核调用堆栈
需要包含的头文件:#include原创 2010-06-25 11:33:00 · 17411 阅读 · 0 评论 -
Ubuntu9.10 安装回 SUN JDK 1.5
Ubuntu9.10 安装回 SUN JDK 1.5原创 2010-06-23 21:08:00 · 5898 阅读 · 0 评论 -
使用git checkout 源代码
使用git checkout 源代码原创 2010-06-23 22:08:00 · 10251 阅读 · 2 评论