<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="WWW Redirect Right property" stopProcessing="true">
<match url=".*"/>
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.xxx\.cn$" negate="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
diff -ruN coreseek-4.1-beta/csft-4.1/buildconf.sh coreseek-4.1-beta.p0/csft-4.1/buildconf.sh | |
--- coreseek-4.1-beta/csft-4.1/buildconf.sh 2011-10-07 20:08:56.000000000 +0800 | |
+++ coreseek-4.1-beta.p0/csft-4.1/buildconf.sh 2015-07-22 15:35:21.268304991 +0800 | |
@@ -2,5 +2,5 @@ | |
autoheader \ | |
&& aclocal \ | |
-&& automake --foreign \ | |
+&& automake --add-missing --foreign \ | |
&& autoconf |
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
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
class test(object): | |
def base36encode(self,number): | |
"""Converts an integer into a base36 string.""" | |
# From https://gist.github.com/kfr2/4287546 | |
import string | |
ALPHABET = string.digits+string.ascii_lowercase |
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
#!/bin/bash | |
#=====================Config====================== | |
mainLog=phone.log | |
filterLog=phone.filter.log | |
maxTries=100 | |
#=====================Config====================== | |
function fetch { | |
curl -Ss --request GET \ | |
--url 'http://js.189.cn/nmall/shop/number/queryNumber.json?areaId=16&areaCode=0510&numberHead=&showCount=50&isFour=&matchNum=&numberFee=-1&numberFlag=1' \ |
条件:
样本数据expr.txt
其列数未知
第一列是年份日期,第二列是时间,要求把第一二列整体代表的所在日期时间提前7583580秒(大约87.7天) 其他列原样输出
$ cat expr.txt
2016-11-04 12:03 1478232180 col2 col2 col3
2016-08-08 17:30 1470648600 col2 none
例子如下
$ awk '{gsub(/-/," ",$1 );gsub(/:/," ",$2);d=$1" "$2" 00";d=mktime(d);d=d + 7583580;d=strftime("%Y-%m-%d %H:%M",d);out="";for (i=3;i<=NF;i++){out=out" "$i};print d" "out }' expr.txt
apt-get install build-essential autoconf
apt-get install libxml2-dev libevent-dev libgmp-dev libmysqlclient-dev libgd-dev libssl-dev libpng12-dev libjpeg-dev libbz2-dev libicu-dev libmcrypt-dev libreadline-dev libxslt-dev libltdl-dev libpq-dev libcurl4-openssl-dev libvmime-dev
ln -s /usr/include/freetype2 /usr/include/freetype2/freetype
phpbrew install 5.3.29 +default+dbs +gd +fpm +pdo +curl +json +hash +mbstring +fileinfo +soap +session +opcache +imap +readline +iconv
then vim /etc/rc.loal
replace #!/bin/sh -e
to #!/bin/bash -e
in it,then
add:
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
#!/bin/bash | |
#receive command | |
#you neet atd daemon to do this | |
cmd="$*" | |
echo $cmd | |
[[ $cmd == "" ]] && { echo 'Command Can Not be Empty' ; exit 1; } | |
command -v at >/dev/null 2>&1 || { echo "I require 'at command' but it's not installed. Aborting." >&2; exit 1; } | |
#set how many minutes to delay | |
range=2-350 | |
echo 'sleep ' $(shuf -i 1-60 -n 1) ';' $cmd |at now + $(shuf -i $range -n 1) min |
NGINXACCESS_WITH_FORWARD_HOST %{IPORHOST:remote_addr}(\:%{INT:remote_port})? - %{USERNAME:remote_user} \[%{HTTPDATE:time_local}\] "(?:%{WORD:method} %{NOTSPACE:request}(?: HTTP/%{NUMBER:http_version})?|%{DATA:rawrequest})" %{INT:status} %{INT:bytes_sent} %{QS:http_referer} %{QS:http_user_agent} %{QS:http_x_forwarded_for} "%{IPORHOST:http_host}"
this works for
10.88.1.12 - - [07/Jan/2017:12:13:33 +0800] "GET / HTTP/1.1" 200 21783 "http://example.com/refererUrl" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36" "1.2.3.4,4.5.6.7" "www.example2.com"
10.88.1.12:8123 - - [07/Jan/2017:12:13:33 +0800] "GET / HTTP/1.1" 200 21783 "http://example.com/refererUrl2" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36" "1.2.3.4,4.5.6.7" "www.example3.com"
apt-get install fonts-droid-fallback ttf-wqy-zenhei ttf-wqy-microhei fonts-arphic-ukai fonts-arphic-uming xfonts-wqy ttf-mscorefonts-installer \
fonts-noto-cjk
IN Ubuntu 16.04 LTS
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
#!/bin/bash | |
#touchpad_toggle.sh | |
action=${1:-'auto'} | |
#echo $action; | |
declare -i ID | |
ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'` | |
declare -i STATE | |
if [ "$action" == "off" ];then | |
STATE=1; | |
elif [ "$action" == "on" ];then |
OlderNewer