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
G # 移到最后一行 | |
yy # 复制一行 | |
Y # 复制一行 | |
p # 在当前行的下一行粘贴,并将光标移到被粘贴行的开头 | |
P # 在当前行的上一行粘贴,并将光标移到被粘贴行的开头 | |
0 # 光标移动到行首 | |
$ # 光标移动到行尾 |
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
tar czvf des.tar.gz des_dir # tar压缩目录 | |
tar xzvf des.tar.gz # tar解压 | |
pbcopy < des.txt # 复制文件内容 | |
ps aux | grep nginx # 查找进程 |
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
function exportCSV($filename, $data) | |
{ | |
header('Content-Encoding: UTF-8'); | |
header('Content-type: text/csv; charset=UTF-8'); | |
header("Content-Disposition:attachment;filename=".$filename); | |
header('Cache-Control:must-revalidate,post-check=0,pre-check=0'); | |
header('Expires:0'); | |
header('Pragma:public'); | |
echo "\xEF\xBB\xBF"; // UTF-8 BOM | |
echo $data; |