This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -c ^processor /proc/cpuinfo | |
nproc --all | |
getconf _NPROCESSORS_ONLN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## history search | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
## visible ring | |
set visible-stats on | |
## menu complete | |
"\C-n": menu-complete | |
## 快捷键备忘 | |
## Ctrl + a : 光标移到行首。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CT='2019-02-31' # init date **When LAST DAY (end of month)** | |
date -d "$CT" +%Y-%m-%d | |
date -d "$CT last month" +%Y-%m-%d # terrible last month | |
# last month day 1 | |
date -d "$(date -d "$CT" +%Y-%m-01) last month" +%Y-%m-%d #fixed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /indexabc-2018.10/_forcemerge?only_expunge_deletes=false&max_num_segments=20&flush=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var iframe = document.getElementsByName('f3')[0]; //获取显示帖子内容的 iframe | |
//初始化抓取结果,它是一个 HTML 页面,因此先把头部以及简单的几个样式放进去 | |
var page = '<!DOCTYPE html><html><head><title>SMTH</title><style>div {border-top: 1px solid yellowgreen; padding: 10px; color: royalblue;}</style></head><body>'; | |
//点击打开第一个帖子就可以激活下面的函数执行 | |
iframe.onload = function(){ | |
var innerDoc = iframe.contentDocument || iframe.contentWindow.document; //获取 iframe 里的 document 对象 | |
var post = innerDoc.getElementsByClassName('article')[0].innerHTML; //获取帖子内容对应的 HTML 元素 | |
page += '<div>'+post.replace(/src="/g, 'src="http://www.2.newsmth.net/')+'</div>'; //把当前的帖子内容加入抓取结果的 HTML 页面里 | |
var next = innerDoc.getElementsByClassName('conPager smaller right')[0].children[1].href; //获取下一个帖子的链接地址 | |
if(iframe.src != next) { //判断是否抓取完成 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rpm2cpio php-5.1.4-1.esp1.x86_64.rpm | cpio -idmv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**注意:不能直接 `make install` 因为有其他工具** | |
**最好通过软连接的方式使用** | |
由于之前通过 brew 安装的 telnet 有中文输入乱码的问题,所以自己手动编译安装工具集 | |
然后通过软链接的方式使用 | |
``` | |
10096 cd ~ && wget http://ftp.gnu.org/gnu/inetutils/inetutils-1.9.4.tar.gz | |
10098 tar xvzf inetutils-1.9.4.tar.gz |