{"id":2400,"date":"2013-01-04T21:55:49","date_gmt":"2013-01-04T13:55:49","guid":{"rendered":"https:\/\/kyle.ai\/blog\/?p=2400"},"modified":"2013-11-19T21:02:26","modified_gmt":"2013-11-19T13:02:26","slug":"linux%e5%91%bd%e4%bb%a4%e7%ac%94%e8%ae%b0%e5%85%ad","status":"publish","type":"post","link":"https:\/\/kyle.ai\/blog\/2400.html","title":{"rendered":"Linux\u547d\u4ee4\u7b14\u8bb0[\u516d]"},"content":{"rendered":"<p>shell\u5bf9\u53d8\u91cf\u52a0\u51cf\u6cd5\uff1ai=100 j=$[i-100]<\/p>\n<p>svn\u66f4\u65b0\u7684\u65f6\u5019\u5ffd\u7565\u6307\u5b9a\u76ee\u5f55\uff1a<br \/>\nsvn update &#8211;set-depth exclude conf\/<\/p>\n<p>sshfs\u3002<br \/>\n\u987e\u540d\u601d\u4e49\uff0c\u5c31\u662f\u901a\u8fc7ssh\u96a7\u9053\u7684\u65b9\u5f0f\uff0c\u628a\u522b\u7684\u4e3b\u673a\u4e0a\u7684\u76ee\u5f55\uff0c\u4ee5fuse\u7684\u65b9\u5f0f\uff0c\u6302\u5728\u5230\u672c\u673a\u4e0a\u3002<\/p>\n<p>curl -F &#8220;action=upload&#8221; -F &#8220;filename=@file.tar.gz&#8221;http:\/\/localhost\/action.php<br \/>\n\u5982\u679c\u4f7f\u7528\u4e86-F\u53c2\u6570\uff0ccurl\u5c31\u4f1a\u4ee5 multipart\/form-data \u7684\u65b9\u5f0f\u53d1\u9001POST\u8bf7\u6c42\u3002-F\u53c2\u6570\u4ee5name=value\u7684\u65b9\u5f0f\u6765\u6307\u5b9a\u53c2\u6570\u5185\u5bb9\uff0c\u5982\u679c\u503c\u662f\u4e00\u4e2a\u6587\u4ef6\uff0c\u5219\u9700\u8981\u4ee5name=@file\u7684\u65b9\u5f0f\u6765\u6307\u5b9a\u3002<\/p>\n<p>ab\u538b\u529b\u6d4b\u8bd5post\u53c2\u6570\uff1a<br \/>\nab -p post.txt -T &#8220;application\/x-www-form-urlencoded&#8221; -n 10000 -c 1000 -C &#8220;PHPSESSID=c70d349634c566b1f5f5a12ef18860b9&#8221; https:\/\/kyle.ai\/test.php<br \/>\n\u5176\u4e2dpost.txt\u5185\u5bb9\u4e3apost\u53c2\u6570\uff1apid=102&amp;mx_id=1082\uff0c-T\u4e3a\u6307\u5b9acontent-type\uff0c\u6ce8\u610fpost.txt\u5185\u5bb9\u6700\u540e\u4e0d\u80fd\u6709\u6362\u884c\u7b26\uff0c\u7528echo -n\u6216 tr -d &#8216;\\n&#8217;\u6765\u53bb\u6389<\/p>\n<p>PHP DB \u7c7b\u5e93ezSQL<\/p>\n<p>\u6267\u884crestart\uff0capache\u4f1a\u6740\u6389\u6240\u6709\u5b50\u8fdb\u7a0b\uff0c\u4f46\u662f\u7236\u8fdb\u7a0b\u4e0d\u5173\u95ed\uff0capache\u53ea\u662f\u91cd\u65b0\u8f7d\u5165\u914d\u7f6e\u6587\u4ef6\u548c\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6\uff0c\u7136\u540e\u91cd\u65b0\u751f\u6210\u4e00\u7cfb\u5217\u5b50\u8fdb\u7a0b\u3002<br \/>\nstop+start\u7684\u6548\u679c\u662f\uff0c\u6740\u6389\u5305\u62ec\u4e3b\u8fdb\u7a0b\u5185\u7684apache\u8fdb\u7a0b\u518d\u91cd\u542f\u3002<br \/>\n\u8fd9\u79cd\u533a\u522b\u4f7f\u5f97\u6709\u4e9b\u73af\u5883\u914d\u7f6e\u5728restart\u4e4b\u540e\u4e0d\u4f1a\u751f\u6548\uff0c\u6bd4\u5982\u5bf9\u57df\u540d\u7684\u89e3\u6790\u3002\u56e0\u6b64\u5efa\u8bae\u73af\u5883\u914d\u7f6e\u4fee\u6539\u540e\u4f7f\u7528stop+start\u91cd\u542fapache\u3002<\/p>\n<p>curl\u4f2a\u9020IP\u548c\u6765\u6e90\uff1a<br \/>\ncurl -H &#8220;X-FORWARDED-FOR:8.8.8.8&#8221; -H &#8220;CLIENT-IP:8.8.8.8&#8221; http:\/\/127.0.0.1\/fakeip.php<\/p>\n<p>SHELL\u968f\u673a\u6570<br \/>\n\u8f93\u51fa10\u4ee5\u5185\u7684\u968f\u673a\u6570<br \/>\necho $(($RANDOM%10))<br \/>\n\u8f93\u51fa\u7684\u7ed3\u679c\u57280~9\u4e4b\u95f4\uff0c\u8fd8\u53ef\u5199\u6210echo $((RANDOM%10))<br \/>\nawk &#8216;BEGIN{srand();print a=int(10*rand())}&#8217;\u662f\u53e6\u4e00\u79cd\u65b9\u6cd5\uff0c\u7ed3\u679c\u4e0e\u4e0a\u9762\u4e00\u6837<br \/>\necho $RANDOM\u662f\u8f93\u51fa\u968f\u673a\u6570\uff0c\u4f46\u662f\u6ca1\u6709\u8303\u56f4<\/p>\n<p>shell\u6570\u7ec4<br \/>\nA=(a b c def)<br \/>\necho ${A[@]} \u6216\u8005 echo ${A[*]} \/\/\u53d6\u5168\u90e8\u5143\u7d20<br \/>\necho ${A[0]} \/\/\u53d6\u7b2c\u4e00\u4e2a\u5143\u7d20<br \/>\necho ${#A[@]} \u6216\u8005 echo ${#A[*]} \/\/\u53d6\u5f97\u6570\u7ec4\u5143\u7d20\u7684\u4e2a\u6570<br \/>\nA[3]=wenzizone.cn \/\/\u5c06\u7b2c\u4e09\u4e2a\u5143\u7d20\u91cd\u65b0\u8d4b\u503c<br \/>\n\u5224\u65adv\u662f\u5426\u5728\u6570\u7ec4ary\u4e2d\uff1a<br \/>\nif [[ &#8220;${ary[@]}&#8221; =~ $v ]]<\/p>\n<p>\u5c01\u88c5\u4e86\u4e00\u4e2ashell\u63d0\u53d6json\u5b57\u6bb5\u7684\u65b9\u6cd5\uff1a<br \/>\npyjson()<br \/>\n{<br \/>\necho $1|python -c &#8216;import json,sys;reload(sys);sys.setdefaultencoding(&#8220;utf-8&#8221;);obj=json.loads(sys.stdin.read().decode(&#8220;utf-8&#8221;));print &#8220;&#8216;&#8221;$2&#8243;&#8216;&#8221; in obj and obj[&#8220;&#8216;&#8221;$2&#8243;&#8216;&#8221;] or &#8220;&#8221;&#8216;<br \/>\n}<br \/>\n\u7528\u6cd5\uff1a<br \/>\ntxt=`cat res`<br \/>\necho `pyjson &#8220;$txt&#8221; username` \uff03pyjson+json\u5b57\u7b26\u4e32+\u8981\u89e3\u6790\u7684\u5b57\u6bb5 json\u5b57\u7b26\u4e32\u8981\u7528\u5f15\u53f7\uff0c\u9632\u6b62\u91cc\u9762\u6709\u7a7a\u683c<\/p>\n<p>vim\u5feb\u6377\u952e gd &#8211; \u5230\u8fbe\u5149\u6807\u6240\u5728\u5904\u51fd\u6570\u6216\u8005\u53d8\u91cf\u7684\u5b9a\u4e49\u5904<\/p>\n<p>shell\u4e2d\u63d0\u53d6html\u6807\u8bb0\u503c\uff0c\u7528html-xml-utils\u5305\u4e2d\u7684hxselect\u547d\u4ee4\u3002\u5982\uff1acat test |hxselect &#8216;#site-info a:nth-child(1)&#8217; -c 2&gt;\/dev\/null\uff0c\u5339\u914did\u4e3asite-info\u4e0b\u9762\u7684\u7b2c\u4e00\u4e2aa\u6807\u8bb0<br \/>\n\u6709\u65f6\u5019\u9047\u5230\u8fd9\u4e2a\u9519\u8bef\uff1aInput is not well-formed. (Maybe try normalize?)<br \/>\n\u5982\u679c\u9047\u5230\u4e0d\u6807\u51c6\u7684html\uff0c\u9700\u8981\u8f6c\u6362\u6210xhtml\u6765\u5904\u7406\uff0c\u7528tidy\u547d\u4ee4\uff1a<br \/>\ncat test | tidy &#8211;output-xhtml yes &#8211;input-encoding utf8 &#8211;char-encoding utf8 &#8211;quiet yes 2&gt;\/dev\/null | hxselect &#8216;#picid&#8217;<br \/>\n\u7b80\u5355\u70b9\uff1acat test | tidy 2&gt;\/dev\/null | hxselect &#8216;#picid&#8217;<br \/>\n\u6216\u8005\u7528hxnormalize\u547d\u4ee4\uff1acat test | hxnormalize -x | hxselect &#8216;#picid&#8217;<\/p>\n<p>grep\u975e\u8d2a\u5a6a\uff0c\u5728.*\u540e\u9762\u52a0\\?\uff0c\u5982\uff0cgrep -o &#8216;value=&#8221;.*\\?&#8221;&#8216;\uff0c\u5339\u914d\u5230value=&#8221;3574&#8243;<\/p>\n<p>FireFox\u4e2d\u4e00\u4e2a\u7c7b\u4f3c\u4e8ehttpWatch\u7684\u7f51\u7edc\u76d1\u89c6\u63d2\u4ef6\u53ebHttpFox<\/p>\n<p>vim\u591a\u884c\u7f16\u8f91\uff0c\u5148ctrl-v\u9009\u4e2d\u8981\u7f16\u8f91\u7684\u884c\uff0c\u7136\u540e\u6309\u5927\u5199i\uff0c\u8f93\u5165\u8981\u63d2\u5165\u7684\u4e1c\u897f\uff0c\u6700\u540eESC\uff0c\u9009\u4e2d\u7684\u884c\u5c06\u540c\u65f6\u6539\u53d8<\/p>\n<p>vim\u547d\u4ee4\u7684\u8bb0\u5f55\u4e0e\u56de\u653e<br \/>\nqa \u5f00\u59cb\u5c06\u540e\u7eed\u7684\u547d\u4ee4\u8bb0\u5165\u5bc4\u5b58\u5668a\uff0c\u8f93\u5165\u5b8c\u6240\u6709\u6307\u4ee4\u540e\uff0cq \u505c\u6b62\u8bb0\u5f55\u3002\u7136\u540e\u8981\u6267\u884c\u6211\u4eec\u5f55\u4e0b\u7684\u547d\u4ee4\uff0c\u6267\u884c@a\u547d\u4ee4\uff0c\u59823@a\uff0c\u6267\u884c\u4e09\u6b21\u5f55\u5165\u7684\u547d\u4ee4\u96c6<\/p>\n<p>\u67e5\u770b\u6587\u4ef6\u72b6\u6001\uff0c\u8be6\u7ec6\u4fe1\u606f\u7b49\uff1a stat filename<\/p>\n<p>\u77e5\u9053BT\u4e0b\u8f7d\u7684hash\u503c\uff0c\u8f6c\u6362\u6210\u78c1\u529b\u94fe\u63a5\u4e0b\u8f7d\u3002<br \/>\nmagnet:?xt=urn:btih:INFOHASH (replace INFOHASH with your info hash).<\/p>\n<p>\u57fa\u672c\u4e0a\u4e0b\u8f7d\u5de5\u5177\u7684\u4e0b\u8f7d\u5730\u5740\u90fd\u662f\u7528base64\u7f16\u7801\u7684\uff0c\u7528base64 -d\u547d\u4ee4\u89e3\u5f00\u5c31\u53ef\u4ee5\u770b\u5230\u539f\u59cb\u4e0b\u8f7d\u5730\u5740\u4e86\u3002<\/p>\n<p>\u8ba1\u7b97\u5b57\u7b26\u4e32\u957f\u5ea6\uff1a echo &#8216;123456789abcdfghig&#8217; | wc -L<\/p>\n<p>ubuntu\u4e0b\u5f55gif\u52a8\u753b\u65b9\u6cd5\uff0csudo apt-get install imagemagick mplayer gtk-recordmydesktop\uff0c\u5148\u7528recordmydesktop\u5f55\u5236\u4e00\u4e2a\u89c6\u9891\uff0c\u7136\u540emplayer -ao null &lt;video file name&gt; -vo jpeg:outdir=output\uff0c\u8f6c\u6210\u8868\u6001\u56fe\u7247\uff0c\u6700\u540e\u8f6c\u6210gif\uff1aconvert output\/* output.gif<\/p>\n<p>\u7edf\u8ba1\u6700\u8fd1\u7528\u8fc7\u7684linux\u547d\u4ee4,\u6d41\u7a0b\uff1a<br \/>\n\u4ece history \u547d\u4ee4\u4e2d\u5f97\u5230\u6700\u8fd11000\u6761\u547d\u4ee4\u3002<br \/>\n\u5220\u9664\u6bcf\u884c\u7684\u884c\u53f7\u3002<br \/>\n\u8bb0\u5f55\u6bcf\u4e00\u884c\u4e2d\u7684\u547d\u4ee4\u3002\u884c\u9996\u7684\u7b2c\u4e00\u4e2a\u82f1\u6587\u5355\u8bcd\uff0c\u4ee5\u53ca\u7ba1\u9053\u540e\u9762\u7684\u7b2c\u4e00\u4e2a\u82f1\u6587\u5355\u8bcd\uff0c\u89c6\u4e3a\u547d\u4ee4\u540d\u79f0\u3002<br \/>\n\u5c06\u5f97\u5230\u7684\u547d\u4ee4\u5217\u8868\u6392\u5e8f\u3002<br \/>\n\u7edf\u8ba1\u6bcf\u4e2a\u547d\u4ee4\u7684\u51fa\u73b0\u6b21\u6570\uff0c\u5148\u4ee5\u6b21\u6570\u964d\u5e8f\u6392\u5217\uff0c\u518d\u4ee5\u547d\u4ee4\u540d\u79f0\u5347\u5e8f\u6392\u5217\u3002<br \/>\nhistory | sed &#8220;s#^\\s\\+[0-9]\\+\\s\\+##g&#8221; | grep -oP &#8220;(?&lt;=^|\\|)\\w+&#8221;|sort |uniq -c| sort -k1,1nr -k2<\/p>\n<p>Chrome\u5f3a\u5236http\u5b9a\u5411\u5230https\u65b9\u6cd5\uff0c\u5982google\u7684\u641c\u7d22\u7ed3\u679c\u94fe\u63a5\u8f6c\u6210https\u7684\uff0c\u5728\u5730\u5740\u680f\u4e2d\u8f93\u5165\uff1a chrome:\/\/net-internals\/\uff0c\u5728HSTS\u9009\u9879\u5361\u4e0b\u7684Domain\u4e2d\u8f93\u5165\u4f60\u60f3\u8981\u5b9e\u73b0\u8fd9\u4e2a\u5f3a\u5236\u8df3\u8f6c\u7684\u57df\u540d\uff0c\u6700\u540e\u52fe\u9009\u4e0aInclude subdomains\uff0c\u70b9\u51fbAdd\u6309\u94ae<\/p>\n<p>\u5bfc\u5165\/\u5bfc\u51fa\/\u5220\u9664 chrome for linux \u7684\u4e2a\u4eba\u8bc1\u4e66\u548c\u6839\u8bc1\u4e66<br \/>\nsudo apt-get install libnss3-tools<br \/>\n\u6d4f\u89c8\u6240\u6709\u8bc1\u4e66 certutil -d sql:$HOME\/.pki\/nssdb -L<br \/>\n\u67e5\u770b\u8bc1\u4e66\u8be6\u60c5 certutil -d sql:$HOME\/.pki\/nssdb -L -n &lt;\u8bc1\u4e66\u522b\u540d&gt;<br \/>\n\u5bfc\u5165\u4e2a\u4eba\u8bc1\u4e66 pk12util -d sql:$HOME\/.pki\/nssdb -i &lt;\u8bc1\u4e66\u6587\u4ef6&gt;<br \/>\n\u5bfc\u51fa\u4e2a\u4eba\u8bc1\u4e66 pk12util -d sql:$HOME\/.pki\/nssdb -n &lt;\u8bc1\u4e66\u522b\u540d&gt; -o &lt;\u5bfc\u51fa\u6587\u4ef6&gt;<br \/>\n\u5220\u9664\u8bc1\u4e66 certutil -d sql:$HOME\/.pki\/nssdb -D -n &lt;\u8bc1\u4e66\u522b\u540d&gt;<br \/>\n\u5bfc\u5165\u6839\u8bc1\u4e66 certutil -d sql:$HOME\/.pki\/nssdb -A -t &#8220;C,,&#8221; -n &lt;\u8bc1\u4e66\u522b\u540d&gt; -i &lt;\u8bc1\u4e66\u6587\u4ef6&gt;<\/p>\n<p>\u4f7f\u7528sudo\u547d\u4ee4\u65f6\u51fa\u73b0\u8b66\u544a\uff1a<br \/>\nsudo\uff1a \u65e0\u6cd5\u89e3\u6790\u4e3b\u673a\uff1achenming-Aspire-5830TG<br \/>\n\u89e3\u51b3\u529e\u6cd5\uff0c\u5728\/etc\/hosts\u4e2d\u6dfb\u52a0127.0.1.1 chenming-Aspire-5830TG<\/p>\n<p>vim\u590d\u5236\u5185\u5bb9\u5230\u5bc4\u5b58\u5668a\u547d\u4ee4 &#8220;ay<br \/>\n\u4ece\u5bc4\u5b58\u5668a\u7c98\u8d34\u547d\u4ee4 &#8220;ap<\/p>\n<p>uniq -c<br \/>\nuniq\u7684\u4f5c\u7528\u662f\u8fc7\u6ee4\u91cd\u590d\u7684\u8bb0\u5f55\uff0c\u53ea\u4fdd\u7559\u4e00\u884c\u3002c\u53c2\u6570\u7684\u4f5c\u7528\uff0c\u662f\u5728\u6bcf\u884c\u7684\u5f00\u5934\u6dfb\u52a0\u8be5\u8bb0\u5f55\u7684\u51fa\u73b0\u6b21\u6570<\/p>\n<p>\u67e5\u770bapache\u52a0\u8f7d\u7684\u6240\u6709\u6a21\u5757\uff1a apachectl -t -D DUMP_MODULES<\/p>\n<p>\u5728\u7ec8\u7aef\u4e0b\u67e5\u770bunicode\u7f16\u7801<br \/>\necho -e &#8216;{&#8220;status&#8221;:10,&#8221;msg&#8221;:&#8221;\\u5df2\\u7ecf\\u7ed3\\u675f\\u4e86&#8243;}&#8217;<\/p>\n<p>\u901a\u8fc7\u8ba1\u7b97md5\u503c\u6765\u67e5\u627e\u91cd\u590d\u6587\u4ef6\uff1a<br \/>\nfind . -type f -exec md5sum &#8216;{}&#8217; &#8216;;&#8217; | sort | uniq &#8211;all-repeated=separate -w 20<br \/>\n\u4e5f\u53ef\u4ee5\u901a\u8fc7\u6587\u4ef6\u5927\u5c0f\u6765\u67e5\u627e\u91cd\u590d\u6587\u4ef6\uff1a<br \/>\nfind . -type f -printf &#8220;%p &#8211; %s&#8221; | sort -nr -k3 | uniq -D -f1<\/p>\n<p>\u6d4b\u8bd5\u7535\u8111\u58f0\u97f3\uff1a speaker-test -c 5 -l 1 -t wav \u4f1a\u64ad\u653e\u4e00\u6bb5\u6d4b\u8bd5\u58f0\u97f3<\/p>\n<p>\u6e05\u7a7a\u6587\u4ef6\u5185\u5bb9\u800c\u4e0d\u5220\u9664\u6587\u4ef6\u672c\u8eab\uff1a $ &gt; filename<\/p>\n<p>grep pattern -r &#8211;include=\\*.{cpp,h} rootdir \u8fc7\u6ee4\u6307\u5b9a\u6587\u4ef6\u7c7b\u578b\uff0c\u5982\uff1agrep &#8216;mx_salt&#8217; -r &#8211;include=\\*.php model<\/p>\n<p>vim\u53ef\u4ee5\u628a\u4ee3\u7801\u6309\u7167\u5f53\u524d\u7684\u8bed\u6cd5\u9ad8\u4eae\u8f6c\u6362\u6210html\u6587\u6863\u3002<br \/>\n\u65b9\u6cd5\u5982\u4e0b\uff1a<br \/>\n\u5982\u679c\u9700\u8981\u628a\u6574\u4e2a\u6587\u6863\u8f6c\u6210html\uff0c\u5728\u547d\u4ee4\u6a21\u5f0f\u4e0b\u6267\u884c\uff1a<br \/>\n:TOhtml<br \/>\n\u5982\u679c\u53ea\u662f\u9700\u8981\u8f6c\u67d0\u51e0\u884c\u4ee3\u7801\uff08\u598230\u523042\u884c\uff09\uff0c\u5219\u6267\u884c\uff1a<br \/>\n:30,42TOhtml<br \/>\n\u8fd9\u6837\u751f\u6210\u7684html\u590d\u5236\u5230PPT\u4e0a\uff0c\u4e0d\u4f1a\u6362\u884c\uff0c\u89e3\u51b3\uff1a<br \/>\n:%s\/\\(&lt;span.*\\)\\n\/\\1&lt;br&gt;\/g<br \/>\n\u4e0a\u9762\u7684\u547d\u4ee4\u662f\u627e\u5230html\u6587\u4ef6\u4e2d\u4ee5&lt;span\u5f00\u59cb\\n\u7ed3\u5c3e\u7684\u884c\uff0c\u628a\u8fd9\u4e9b\u884c\u4e2d\u7684\\n\u66ff\u6362\u4e3a&lt;br&gt;<\/p>\n<p>\u7528shell\u5220\u9664\u4e00\u4e2a\u6587\u4ef6\u7684\u524d10\u884c\uff1a<br \/>\nex \/root\/file.txt &lt;&lt; EOF<br \/>\n1,10d<br \/>\nwq<br \/>\nEOF<\/p>\n<p>\u8bfb\u53d6\u6587\u4ef6\u7684 \u6307\u5b9a\u884c\/\u7b2cN\u884c \u5b57\u7b26\u4e32 \uff1ased -n 7p 1.txt<\/p>\n<p>\u590d\u5236\u5230\u6307\u5b9a\u76ee\u5f55\uff0c\u5982\u679c\u76ee\u5f55\u4e0d\u5b58\u5728\uff0c\u5219\u521b\u5efa\uff1a test -d &#8220;$d&#8221; || mkdir -p &#8220;$d&#8221; &amp;&amp; cp file &#8220;$d&#8221;<\/p>\n<p>#\u590d\u5236\u6587\u4ef6\u65f6\uff0c\u5982\u679c\u76ee\u6807\u6587\u4ef6\u8def\u5f84\u5df2\u7ecf\u5b58\u5728\u6587\u4ef6\u4e86<br \/>\n# If a file foo exists in the target, then\u2026<br \/>\ncp -r &#8211;backup source target # rename foo \u2192 foo~<br \/>\ncp -r &#8211;backup=t source target # rename foo \u2192 foo.~1~ (or foo.~2~, etc)<\/p>\n<p>\u68c0\u67e5\u5f00\u673a\u81ea\u542f\u52a8\u7684\u670d\u52a1\uff1achkconfig\uff0c\u53d6\u6d88\u81ea\u542f\u52a8\uff1aupdate-rc.d -f gearman-job-server remove\uff0c\u6dfb\u52a0\u81ea\u542f\u52a8\uff1aupdate-rc.d -f mysql defaults<\/p>\n<p>ubuntu 12.04 eclipse\u4ee3\u7801\u63d0\u793a\u5f39\u51fa\u6846\uff0c\u9009\u4e2d\u7684\u989c\u8272\u95ee\u9898\uff0cGo into the Preferences (Window -&gt; Preferences)<br \/>\nChoose General -&gt; Appearance from the left menu<br \/>\nUncheck the checkbox Use mixed fonts and colours for labels<\/p>\n<p>vim\u4e2d :script_names\u67e5\u770b\u5df2\u7ecf\u52a0\u8f7d\u7684\u6587\u4ef6<br \/>\nvim\u7684Bundle &#8216;godlygeek\/csapprox&#8217;<br \/>\n\u662f\u7528\u6765\u652f\u6301\u90a3\u4e9b\u53ea\u80fd\u7528\u5728gui\u6a21\u5f0f\u4e0b\u9762\u7684colorscheme\uff0c\u914d\u7f6e\u7684\u65f6\u5019\uff0c\u5fc5\u987b\u628acsapprox\u653e\u5728vim-easymotion\u524d\u9762\u3002\u5426\u5219\u542f\u52a8\u7684\u65f6\u5019\u52a0\u8f7d\u4e0d\u4e86<br \/>\n&#8211; Bundle &#8216;Lokaltog\/vim-easymotion&#8217;<br \/>\nBundle &#8216;godlygeek\/csapprox&#8217;<br \/>\n+ Bundle &#8216;Lokaltog\/vim-easymotion&#8217;<\/p>\n<p>svn\u4e0d\u652f\u6301http\uff1a<br \/>\nUnrecognized URL scheme for &#8216;http:\/\/xxxx.googlecode.com\/svn\/trunk&#8217;<br \/>\nversion of svn in \/usr\/local that does not support http. If you use \/usr\/bin\/svn it should work.<\/p>\n<p>\u67e5\u770b\u6587\u4ef6\u7f16\u7801\uff1afile -i &lt;filename&gt;\uff0cvim\u4e2d set fileencoding<\/p>\n<p>\u76d1\u6d4bmongo\u811a\u672c\uff1ahttps:\/\/github.com\/mzupan\/nagios-plugin-mongodb \u5982\u67e5\u770bmaster\uff1apython check_mongodb.py -H 10.8.8.2 -A replica_primary -r shard1<\/p>\n<p>linux\u67e5\u770b\u8fdb\u7a0b\u5bf9\u5e94\u7684\u7ebf\u7a0b\u4fe1\u606f<br \/>\nps -Lf pid<br \/>\n\u67e5\u770b32768\u7aef\u53e3\u662f\u54ea\u4e2a\u7a0b\u5e8f\u5728\u5360\u7528\uff0c lsof -i:32768<\/p>\n<p>\u6309\u884c\u5207\u5272\u6587\u672c\u6587\u4ef6\uff0c split -l 2 100.txt new_prefix\uff0c\u6bcf\u4e2a\u6587\u4ef6\u4e24\u884c<\/p>\n<p>cal\u547d\u4ee4\u53ef\u4ee5\u7528\u6765\u663e\u793a\u516c\u5386\uff08\u9633\u5386\uff09\u65e5\u5386<br \/>\ncal\u3000\u663e\u793a\u5f53\u524d\u6708\u4efd\u65e5\u5386<br \/>\ncal 9 2012\u3000\u663e\u793a\u6307\u5b9a\u6708\u4efd\u7684\u65e5\u5386<br \/>\ncal -j \u663e\u793a\u81ea1\u67081\u65e5\u7684\u5929\u6570<br \/>\ncal -m \u661f\u671f\u4e00\u663e\u793a\u5728\u7b2c\u4e00\u5217<\/p>\n<p>svn\u6dfb\u52a0\u5ffd\u7565\u6587\u4ef6\u5939\u6216\u6587\u4ef6\uff0csvn propset svn:ignore dirname .<br \/>\n\u5982\u679c\u60f3\u8981\u5ffd\u7565\u591a\u4e2a\u5bf9\u8c61\uff0c\u53ef\u4ee5\u7528\u6362\u884c\u6765\u5206\u5f00\u5bf9\u8c61\uff0c\u53ef\u4ee5\u7528\u7f16\u8f91\u5668\u6765\u7f16\u8f91\u5217\u8868\uff1a<br \/>\nsvn propedit svn:ignore .<br \/>\n\u5982\u679c\u8981\u5ffd\u7565\u7684\u6587\u4ef6\u5939\u5df2\u7ecf\u5728svn\u7248\u672c\u91cc\u9762\u4e86\uff0c\u5219\u8981\u5148\u5728svn\u4e2d\u5220\u9664<br \/>\nsvn rm &#8211;keep-local dirname<\/p>\n<p>\u67e5\u770b\u6587\u4ef6\u7684mime\u7c7b\u578b\uff0cfile -ib 20121124094332257.gif<\/p>\n<p>convert 449&#215;505.png -resize &#8216;200&#215;300&gt;&#8217; resize.jpg \u6309\u5927\u5c0f200&#215;300\u538b\u7f29\u56fe\u7247\u5927\u5c0f\uff0c\u5e76\u6309\u6bd4\u4f8b\uff0c\u957f\\\u5bbd\u6700\u5927\u4e0d\u8d85\u8fc7200\\300\uff0c\u6587\u6863<br \/>\nhttp:\/\/www.imagemagick.org\/script\/command-line-processing.php#geometry<\/p>\n<p>\u8fd0\u884cphpunit\u62a5\u9519\uff1a<br \/>\nrequire_once(): Failed opening required &#8216;PHP\/CodeCoverage\/Filter.php&#8217;<br \/>\n\u89e3\u51b3\uff1a<br \/>\nsudo apt-get remove phpunit<br \/>\nsudo pear channel-discover pear.phpunit.de<br \/>\nsudo pear channel-discover pear.symfony-project.com<br \/>\nsudo pear channel-discover components.ez.no<br \/>\nsudo pear update-channels<br \/>\nsudo pear upgrade-all<br \/>\nsudo pear install &#8211;alldeps phpunit\/PHPUnit<br \/>\nsudo pear install &#8211;force &#8211;alldeps phpunit\/PHPUnit<\/p>\n<p>\u5c06mkv\u8f6c\u6210mp4\uff1aavconv -i input.mkv -codec copy output.mp4<\/p>\n<p>ubuntu\u4e0bapt-get\u88c5\u8f6f\u4ef6\u7684\u65f6\u5019\u9047\u5230\u4e0b\u9762\u9519\u8bef\uff1a<br \/>\nE:Encountered a section with no Package: header, E:Problem with MergeList \/var\/lib\/apt\/lists\/cn.archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages<br \/>\n\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u4e24\u6761\u547d\u4ee4\uff1a<br \/>\nsudo rm -rf \/var\/lib\/apt\/lists\/*<br \/>\nsudo apt-get update<\/p>\n<p>\u5c06\u7a0b\u5e8f\u6dfb\u52a0\u5230\u542f\u52a8\u5668\u91cc\u9762\u53bb\uff0c\u65b0\u5efa\u4e00\u4e2a\u4ee5.desktop\u4e3a\u540e\u7f00\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u5185\u5bb9\u5982\uff1a<br \/>\n[Desktop Entry]<br \/>\nName=eclipse<br \/>\nComment=eclipse<br \/>\nGenericName=eclipse<br \/>\nExec=\/home\/chenming\/eclipse\/eclipse<br \/>\nIcon=\/home\/chenming\/eclipse\/icon.xpm<br \/>\nStartupNotify=true<br \/>\nTerminal=false<br \/>\nType=Application<br \/>\nCategories=GNOME;GTK;Utility;<br \/>\n\u7136\u540e\u6267\u884c\u547d\u4ee4\uff1a<br \/>\ncd \/usr\/share\/applications<br \/>\nsudo ln -s ~\/eclipse\/eclipse.desktop<\/p>\n<p>\u5199\u4e00\u884c\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u7528\u4efb\u4f55\u8bed\u8a00\uff0c\u5f53\u65f6\u95f4\u662f2013\u5e741\u67081\u65e5\u96f6\u65f6\u96f6\u5206\u96f6\u79d2\u65f6\uff0c\u6253\u5370\uff1a&#8221;Hello\uff0cNew Year.&#8221;<br \/>\nexpr `date -d &#8220;2013-1-1 00:00:00&#8221; +%s` &#8211; `date -d &#8220;now&#8221; +%s` | xargs -i sleep {} &amp;&amp; echo &#8216;Hello\uff0cNew Year.&#8217;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>shell\u5bf9\u53d8\u91cf\u52a0\u51cf\u6cd5\uff1ai=100 j=$[i-100] svn\u66f4\u65b0\u7684\u65f6\u5019\u5ffd\u7565\u6307\u5b9a\u76ee\u5f55\uff1a svn update [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-2400","post","type-post","status-publish","format-standard","hentry","category-my_notes"],"_links":{"self":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/comments?post=2400"}],"version-history":[{"count":3,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2400\/revisions"}],"predecessor-version":[{"id":4820,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/posts\/2400\/revisions\/4820"}],"wp:attachment":[{"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/media?parent=2400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/categories?post=2400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kyle.ai\/blog\/wp-json\/wp\/v2\/tags?post=2400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}