自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(42)
  • 收藏
  • 关注

原创 SSH 管道的几种玩法

常见的三种SSH管道用法

2023-03-07 10:43:44 374

原创 2021年11月 Win10上搭建基于VScode的ESP32 Arduino开发环境

1. 安装Arduino IDE去官网下载Windows安装文件版本,并安装。不要从Win10应用商店安装。2. 从Arduino IDE里安装ESP的开发包。打开 Arduino IDE,打开"文件"菜单"首选项",在"附加开发板管理器网址"中填入:https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.jsonr然后打开“工具”菜单中的“开发板管理器”,搜索“..

2021-11-05 11:03:47 504

原创 【Bash脚本】BASH script to find files exist in two folders

function file_in_both{    local DIRA=$1    local DIRB=$2    local DIRC=$3    local FILE_LIST=$(find $DIRA/ -type f)    local F    for F in $FILE_LIST ; do        F=`echo $F | sed -e 's/\('$DIRA'\/\)*/...

2018-03-06 17:25:52 257

转载 Readline Keys

Readline Killing And Yankingkill-line (C-k)Kill the text from point to the end of the line.backward-kill-line (C-x Rubout)Kill backward to the beginning of the line.unix-line-discard (C-

2015-06-20 21:13:30 575

原创 JS code do conversion between hexStr and byteArray

Online Cryptographic Calculator/* Convert a hex char to value */function hexChar2byte(c){  var d = 0;  if (c>='A' && c  {    d = c.charCodeAt(0) - 'A'.charCodeAt(0)

2015-05-20 00:51:13 1053

原创 How to measure memory usage of linux process

static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct *vma) +{ + /* + * Don't forget to update Documentation/ on changes. + */ +#define __VM_FLAG(_f) (!!(vma->vm_flags &

2014-06-20 03:30:56 812

原创 【Bash脚本】处理命令行入参

主要利用getopt对参数进行检查,然后循环找到各个参数。#!/bin/bashfunction printUsage { echo "Usage:" echo "$0 [-f format] [-s setting]"}params=`getopt f:s: "$@"`if [ $? != 0 ] ; then echo "Invalid argumen

2013-07-10 19:40:40 1094

原创 Linux command line collection

1. sudo passwd root     #set root password    sudo passwd -l root # Lock root  sudo passwd -u root # Unlock root2.

2013-07-06 17:32:01 604

原创 【Bash脚本】删除两个目录下相同的文件

#!/bin/shfunction cmp_del() {if [ -f $1 ] && [ -f $2 ]; thendiff -q $1 $2 > nullif [ $? -eq 0 ]; thenrm -f $1rm -f $2fielif [ -d $1 ] && [ -d $2 ]; thenlocal SUBFILES=`ls $1/`for

2013-06-25 18:27:56 1347

原创 键盘上的标点符号的中英文名称对照表

符号英文名中文名~tilde or swung dash波浪字符或代字号!exclamation mark惊叹号@at sign or commercial at爱特或小老鼠#number sign井

2013-06-09 14:59:19 16203

原创 How to add a Linux service

1. Create a service script file under /etc/init.d/. Sample file abc attached below.Pay attention to the comment line starting with "chkconfig". It specify the run level, start priority and terminate

2013-02-16 14:28:17 1907

转载 解决Chrome中打不开Google搜索结果链接

由于Google的搜索结果都要经过Google跳转(Safari上视乎没有跳转,可以直接进入结果页面),默认跳转使用未加密的HTTP连接,经常被我国GFW拦截,导致无法打开Google搜索结果!解决办法是,对所有对跳转采用加密的HTTPS连接:1,在Chrome浏览器的地址栏中输入:chrome://net-internals2,点击左侧导航栏的HSTS3,

2012-11-28 10:43:40 12426 2

转载 Mac OS 和Windows键盘对照表

Mac OS and Windows Keyboard EquivalentsAre you a Mac OS user who has to use Windows at work? Or are you a former Windows user new to the Mac platform? As you've probably surmised, there are key di

2012-07-29 20:04:17 12848

原创 GDB用法总结

1. 设置进程启动参数set args arg1 arg2 ....2. bt列出线程调用栈之后,在调用栈的各层(栈帧)之间切换frame num3. info threads列出线程之后,在各线程之间切换thread num4. 对所有线程执行bt列调用栈thread apply all btthread apply all bt full

2012-01-31 16:38:05 2334

原创 用批处理将视频和照片分开

用手机和数码相机拍照时,视频和照片经常放在同一个文件夹里。如果想复制一份只包含照片的目录,可以用一个批处理文件解决。echo .mp4>>c:\movie.txtecho .avi>>c:\movie.txtecho .3gp>>c:\movie.txtecho .mov>>c:\movie.txtxcopy "%1" "%2" /E /EXCLUDE:c:\m

2012-01-25 11:25:20 1447

转载 UTF-8

UTF-8编码字节含义对于UTF-8编码中的任意字节B,如果B的第一位为0,则B为ASCII码,并且B独立的表示一个字符;如果B的第一位为1,第二位为0,则B为一个非ASCII字符(该字符由多个字节表示)中的一个字节,并且不为字符的第一个字节编码;如果B的前两位为1,第三位为0,则B为一个非ASCII字符(该字符由多个字节表示)中的第一个字节,并且该字符由两个字节表示;如果B的前三位为1,

2012-01-17 13:43:12 624

转载 NTP servers

Name IP Address Location 210.72.145.44  (国家授时中心服务器IP地址)133.100.11.8  日本 福冈大学time-a.nist.gov 129.6.15.28 NIST, Gaithersburg, Maryland time-b.nist.gov 129.6.15.29 NIST, Gaithersburg, Marylan

2011-11-02 13:34:43 970

转载 Install NVDIA driver on Fedora12

I think Constantine (Fedora 12) is nice, but I just spent a frustrating day trying to disable the new experimental"Nouveau" video driver. Th

2011-09-14 17:46:12 597

转载 ReadLine快捷键

或许很多人已经知道 readline,但是总有人不知道。readline 从字面上来理解,就是从“行”上面读取。实际上就是一个行编辑库,bash 在用,mysql 也在用,mutt 也在用。通过 readline,可以方便的在命令行上面移动,增删,复制,粘贴,搜索。比如:

2011-08-10 09:51:35 1181

原创 Show NFS's export list (exported pathes)

"showmount -e nfs_server_hostname_or_ip " show NFS server's export list

2011-08-04 18:03:43 875

原创 在SourceInsight中用快捷键打开文件所在的目录

创建一个Custom Command:  ShellExecute open %d.  然后关联一个快捷键。同理, 创建Custom Command: ShellExecute open "http://www.google.com/search?q=%w"  可以实现用Goog

2011-07-28 15:04:31 9063

原创 strspn() and strcspn()

[ Fro m Linux Programmer's Manual ]NAME       strspn, strcspn - search a string for a set of charactersSYNOPSIS       #include        size_t

2011-07-26 17:48:36 737

原创 Linux使用Netbios Name及用WINS解析域名

1. 让windows通过域名访问linux vi /etc/samba/smb.conf打开netbios name一项,并给出一个netbios名。 重启smb和nmb服务sudo service smb restartsudo service nmb restart 2. 让linux可以通过域名访问windows(或其他开启了netbios名的linux)

2011-03-02 15:21:00 10530

原创 用bash脚本下载ku6网视频

<br /><br />#!/bin/bash<br /> <br />function crack_ep_html {<br />    declare -a TO=("///u0020"   "///u0021"  "///u0022"  "///u0023"  "///u0024"  "///u0025"  "///u0026"  "///u0027"<br />                   "///u0028"   "///u0029"  "///u002a"  "///u002b"  "/

2011-01-02 00:44:00 1230

转载 用注册表禁止运行指定的程序

<br /><br />注册表中禁止运行:<br />::::::::::::::::::::::::::::::::::::::<br />@echo off<br />set route=HKLM/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Image File Execution Options<br />:fix<br />for /f %%i in (list.ini) do reg add "%route%/%%i" /v Debugger /t R

2010-12-30 00:12:00 2420

转载 Using Software Restriction Policies to Protect Against Unauthorized Software

<br />http://technet.microsoft.com/en-us/library/bb457006.aspxPublished: January 01, 2002 | Updated: May 25, 2004<br />Abstract<br />Software restriction policies are a new feature in Microsoft® Windows® XP and Windows Server 2003. This important feature p

2010-12-30 00:00:00 2680

原创 在IE7中禁用地址栏

<br /><br />在 Internet 浏览器 7,可以使用"NoNavBar"注册表值以禁用地址栏。<br /> <br />对于每用户的设置值位于以下项:<br /> <br />[HKEY_CURRENT_USER/Software/Policies/Microsoft/Internet Explorer/Toolbars/Restrictions]<br /> <br />值名称: NoNavBar<br />值类型: DWORD<br />数据: 0x00000001<br /> <br /

2010-12-29 23:54:00 885

原创 用批处理脚本获取外网IP (Obtain WAN IP by bat script)

<br />借助:<br />(1)URL下载工具curl,下载页面http://www.paehl.com/open_source/?CURL_7.21.3<br />(2)IP探测网站:http://www.whatismyip.com/automation/n0923094

2010-12-22 13:29:00 2676

转载 Bash中命令连接符的用法——一次执行多个命令

<br />多个命令可以放在一行上,其执行情况得依赖于用在命令之间的分隔符。<br /><br />如果每个命令被一个分号 (;) 所分隔,那么命令会连续的执行下去,如:<br />引用beyes@linux-beyes:/proc> printf "%s/n" "This is executed" ; printf "%s/n" "And so is this"<br />This is executed<br />And so is this<br /><br />如果每个命令被 && 号分隔,那么这些

2010-12-15 11:04:00 15750 1

原创 CreateEvent()中bManualReset的作用

<br /> <br />对于手动复位的(bManualReset=TRUE)的Event,当多个线程等待同一个Event时,一次SetEvent()激活所有等待线程。<br /> <br />对于自动复位的(bManualReset=FALSE)的Event,当多个线程等待同一个Event时,一次SetEvent()激活一个等待线程。

2010-11-29 15:48:00 2395

转载 Resizing LVM Volumes in Linux

<br /><br />Resizing LVM Volumes in Linux: <br />By David Maphis 4/29/2008 <br /> <br />In this example I will changed the size of my root partition without <br />affecting any data. Since this is a VM, I can extend my vmdk with the <br />“vmkfstools” comm

2010-08-20 08:38:00 878

转载 9 Tips to Use Apachectl and Httpd like a Power User

<br /><br />After you have installed Apache2, if you want to use apachectl and httpd to it’s maximum potential, you should go beyond using start, stop and restart. The 9 practical examples provided in this article will help you to use apachectl and httpd v

2010-08-03 23:44:00 817

原创 C语言函数access(szFilePath, 0)用于判断文件是否存在

<br /> <br /> <br /><br /> <br />From MSDN:<br /> <br />access<br /><br />This POSIX function is deprecated beginning in Visual C++ 2005. Us

2010-07-11 19:07:00 7931

原创 Bash中的字符串截取

1. 按子串分割截取${varible#*string}               从左往右,截取第一个string子串之后的字符串${varible##*string}             从左往右,截取最后一个string子串之后的字符串${varible%string*}              从右往左,截取第一个string子串之前的字符串${varible%%string*}          从右往左,截取最后一个string子串之前的字符串例如:export TEST=123abc4

2010-07-07 11:58:00 29934

原创 在Fedora中使用飞鸽传书

1. 在Add/Remove software中搜索ipmsg,选中g2ipmsg,安装。2. 在防火墙中允许访问端口2425(TCP+UDP)。3. 要在飞鸽传书中使用中文,需在g2ipmsg的Preference中character code选择GB18030。

2010-06-27 03:06:00 776

原创 在Fedora Linux中用GUI配置NFS Server

1.在Add/Remove Software中搜索NFS,在搜索结果中找到NFS Server congifuration tool,安装它。2.运行NFS server configuration tool后,点击Add在Directory中是欲共享的本机路径,Host(*)是允许访问的NFS客户端的主机,比如本机ip为192.168.0.2,子网掩码255.255.255.0,想让子网内所有主机都能访问本NFS,可以在Host(*)中填入 192.168.0.*。按需要输入其他配置。3. 在NFS se

2010-06-27 01:08:00 1189

原创 用XManager访问Fedora10

在Fedora10上: 1. 下载安装XDM 2. 编辑/etc/X11/xdm/Xaccess,将下面的行:   #* # any host can get a login window改为:  * # any host can get a login window 3. 修改/etc/X11/gdm/gdm.conf,找到下面的信息:[xdmcp]Enable=0 或E

2010-05-16 10:54:00 690

原创 解决Windows中无法以全屏模式显示远程桌面

当设置的远程桌面的分辨率大于本地桌面分辨率时即可进入全屏显示模式。 打开“远程桌面连接”后,点击“选项”->“显示”->“远程桌面大小”,把滑块拉到最右边,点击“连接”即可以全屏模式查看远程桌面。

2009-12-17 14:13:00 3140

原创 从Fedora 10 升级到Fedora 12

使用preupgrade升级Fedora10 到FC12,升级过程中提示/boot空间不够,于是删掉了/boot下后缀为fc10的几个文件,终于凑足了空间。 重启后来到了grub的提示符,傻眼了,google到这篇文章:http://technotes.twosmallcoins.com/?p=286,给我了很大的启发。 我的做法是: grub> root (hd0, 0)   grub> ker

2009-12-11 10:53:00 825

原创 用WinDbg调试子进程

在调试父进程时使用.childdbg命令,这样当子进程创建成功后,调试器会在第一时间得到通知,然后就可以用|命令切换被调试进程开始调试子进程。 参见:http://www.osronline.com/showThread.cfm?link=144937

2009-12-06 21:47:00 4173

空空如也

空空如也

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

TA关注的人

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