
Python/Rust
文章平均质量分 68
ztguang
出淤泥而不染,濯清涟而不妖,中通外直,不蔓不枝,香远益清,亭亭净植,可远观而不可亵玩焉。
展开
-
experiment目录递归,indent C standard style
Linux目录递归改变文件名大小写[root@localhost Desktop]# lsexperiment-2.6-new.tar.bz2digui-dir-del-M.sh digui-dir-indent.shexperiment[root@localhost Desktop]# 第一步:[root@localhost Desktop]# ./digui-dir-del-M.sh expe原创 2016-03-30 10:29:27 · 448 阅读 · 0 评论 -
用linux命令分析文件-排序-统计(sort, uniq, awk)
[root@bogon 桌面]# cat booklist.txt97873021151999787302142201978730211519997871152429079787115253293978730211519997873021422019787115253293[root@bogon 桌面]# sort booklist.txt | uniq -c原创 2016-03-30 10:38:59 · 1084 阅读 · 0 评论 -
diff 比较2个文件夹
http://blog.youkuaiyun.com/longxj04/article/details/7033744 比较文件夹记得加上-r, 这样才可以递归所有文件夹,-q可以只输出哪些文件是不一样的,对于比较文件夹,可能这个比较有用。不过-q输出不同的文件时,有些情况是一个文件一个文件夹下有,一个没有,但是-q输出的是2个文件不一样 diff -Nrq a b原创 2016-02-01 00:00:00 · 423 阅读 · 0 评论 -
在Linux, 找出新修改的文件
#在Linux系统下, 找出新修改的文件,并且,复制到 合适的位置#注意:每次修改代码前,在/var/www/html/jitong360temp 下面 touch time.txt[root@bogon jitong360temp]# pwd/var/www/html/jitong360temp[root@bogon jitong360temp]# touch time.txt [root@bo原创 2016-02-01 00:00:00 · 467 阅读 · 0 评论 -
百度MP3 SHELL脚本
http://www.iteye.com/topic/692451 管理员在2009年8月13日编辑了该文章文章。 --> --> window._bd_share_config={"common原创 2016-02-01 00:00:00 · 385 阅读 · 0 评论 -
采集百度top500歌曲,python2.7.2
http://blog.b999.net/post/141/#-*- coding: UTF-8 -*-'''Created on 2012-3-8@author: tiantianModify: 2012-4-15The correct save to file in windows'''import urllibimport reimpo原创 2016-02-01 00:00:00 · 841 阅读 · 0 评论 -
linux上php木马、后门查杀总结
http://ggmmchou.blog.163.com/blog/static/59333149201151733626676/ linux上php木马、后门查杀总结 经过联系断续一个月的对抗,网站被攻击、挂马、做SEO黑帽的问题终于告一段落,现在总结下经验。 Web Server(Nginx为例)1、为防止跨站感染,要做虚拟主机目录隔离(我是直接利用fpm建立多原创 2016-02-01 00:00:00 · 3262 阅读 · 0 评论 -
Waf is a Python-based framework for configuring, compiling and installing applications
https://github.com/waf-project/waf原创 2016-05-14 08:54:24 · 534 阅读 · 0 评论 -
在php中的变量和函数名前加&符号的意思
http://www.phpzixue.cn/detail785.shtml在php中的变量和函数名前加&符号的意思:在PHP中&符号即传的是变量的引用而不是拷贝,引用意味着用不同的名字访问同一个变量内容。这并不像 C 的指针,它们是符号表别名。注意在 PHP 中,变量名和变量内容是不一样的,因此同样的内容可以有不同的名字。最接近的比喻是 Unix 的文件名和文件本身 - 变量名是目录原创 2016-03-30 10:38:21 · 750 阅读 · 0 评论 -
张坤 2012.5.4 sed去掉所有的HTML标签
作者:2010级嵌入式 张坤[root@localhost 桌面]# cat testfile.txtHello WorldWelcome to the world of regexp![root@localhost 桌面]# sed 's/]*>//g' testfile.txtHello WorldWelcome to the world of regexp![root@localhost原创 2016-03-30 10:38:15 · 936 阅读 · 1 评论 -
configure: error: ZLIB extension requires zlib >= 1.0.9
[root@localhost php-5.2.17]# PATH=$PATH:/usr/local/arm/3.4.1/bin/[root@localhost php-5.2.17]# CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/opt/php5 --disable-all --enable-pdo --with-sqlite3原创 2016-03-30 10:31:14 · 2825 阅读 · 0 评论 -
SHELL中时间的比较
curtime=`date "+%H:%M:%S"`date1="08:00:00"date2="12:00:00"date3="13:00:00"date4="17:00:00"[[ ("$date1" 管理员在2009年8月13日编辑了该文章文章。 --> -->原创 2016-03-30 10:32:01 · 2718 阅读 · 0 评论 -
批量修改文本文件编码GB18030为UTF-8
[root@localhost Desktop]# ./digui-gb18030-utf8.sh experimentdigui-gb18030-utf8.sh 文件内容如下:#!/bin/sheachd() { for chkfile in $1/* do if [[ -f "$chkfile" ]] th原创 2016-03-30 10:32:04 · 2514 阅读 · 0 评论 -
PHP中文乱码
mysql_query("SQL语句");之前执行 mysql_query("set names 'utf-8'"); 管理员在2009年8月13日编辑了该文章文章。 --> --> window._bd原创 2016-03-30 10:34:36 · 373 阅读 · 0 评论 -
去掉 文本文件 换行符
# awk 'NR == 1 {p = $0} NR > 1 {print p; p = $0} END{printf p} ' SerialNumber.dat > tmp.txt# cp tmp.txt SerialNumber.dat 管理员在2009年8月13日编辑了该文章文章。 -->原创 2016-03-30 10:36:21 · 1481 阅读 · 0 评论 -
JavaScript 字符串与数组转换函数[不用split与join]
http://www.jb51.net/article/21388.htm下面的代码,不考虑他的运行效率的话,思路不错,大家可以看看,但在实际的应用中,我们仍然使用split或join来实现数组的操作。两个自定义的实现字符串与数组相互转换的js函数,希望能对大家有用: function StringToArray(str,substr) { /* 函数功能:字符串按照指定字符串分割转换为数组 参数原创 2016-03-30 10:37:33 · 838 阅读 · 0 评论 -
发短信 汉字编码 utf-8 UCS-2BE
function utf82unicode($str) { return iconv("utf-8", "UCS-2BE", $str);} function hex2str($hexstring) { $str = ''; for($i = 0, $len = strlen($hexstring); $i { $str .= sprintf("%02X原创 2016-03-30 10:37:44 · 1157 阅读 · 0 评论 -
张坤 2012.5.4 egrep在文件中找IP地址
作者:2010级嵌入式 张坤[root@localhost 桌面]# cat aaa.txt192.168.1.11234.234.04.08123.1234.045.678asdfasdf127.0.0.1asdfsadf0.0.0.0255.255.0.0非法ip: 256.0.0.256abcde+++++++++++++++++++++++++++++++++++++++++[root@原创 2016-03-30 10:38:13 · 603 阅读 · 0 评论 -
Rust 取代 C++ ?
Rust 取代 C++ ?转载 2017-12-16 09:11:32 · 14968 阅读 · 5 评论