#! /bin/bash #version 2.1 #auther LF=/var/log/statement/daily/statement.log #current work directory CW=’/path/to/work/space’ YESTERDAY=`date +%Y%m%d -d ‘yesterday’` if [ $1 ]; then YESTERDAY=$1 fi download () { if [ -f “Statement/zip/$” ]; then echo “Already sending $YESTERDAY.statement” | tee -a $LF read -n1 -p “Do you want force to send mail [Y|N]? ” current_input case $current_input in […]

vsftp translation error 500 issue illegal ports

For some reason couldn’t connect to vsftp from “out side”. Today something happened on new software and my workmate must go back to office. That’s a bad idea. But finally, I just solved and figured out why it’s happened. Just because of iptables problems. In .conf file of vsftpd. There’re some configuration lines must be […]

How to track error when start apache fails on MacOS X

A few days ago I was update php through brew. Then apache2 was dead. And then there’s an odd issue which is no error log show me in error file. finally google tell me how to track error in CLI. It’s just soooo easy. When you start you apache server, only thing you do is […]

Default accounts for routers

Marconi – Telkom ADSL (Marconi Firmware) admin administrator Maxell – T2RN-2000 (Maxell Spanish Firmware) admin admin Mecer – WAR25TC (Addon Firmware) admin admin Mediacom – M-NTWRN (Mediacom Firmware) admin admin Medialink – MWN-WAPR150N (Medialink Firmware) admin admin Meetus – AMT1004 (Meetus Firmware) admin adslnadam Mega – 200VWR (Mega Firmware) Meganet – F-18 (Meganet Firmware) admin […]

How to change your source of gem from official to Taobao

***All steps below in cli*** Step 1 Remove official resource from source list gem sources –remove Step 2 Add Taobao source gem sources -a Step 3 Type in: gem sources -l then ‘enter’ It works, if you see this below ⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️ *** CURRENT SOURCES *** ⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️⬆️

How to using QQ SMTP server send E-mail on Centos6

Step One. vim /etc/mail.rc #Appending two lines blow at the buttom of you just opened file /etc/mail.rc #Line one set #Line two set smtp-auth-password=thisIsPassWordOfYourEmail smtp-auth=login Step Two. echo “this is content of EMail” |mail -s “this is title” someone@email.address

How to calculate age, gender from ID using SQL

SELECT 0 ,getip.lastloginip ,getip.location ,info.uid as userID ,info.truename ,left(CAST(SUBSTRING(idnumber,7,8) AS DATETIME),4) AS BIRTHDAY_YEAR#this is IMPORTANT ,FROM_UNIXTIME(UNIX_TIMESTAMP(CAST(SUBSTRING(idnumber,7,8) AS DATETIME)),’%m-%d’) AS BIRTHDAY#this is IMPORTANT ,MOD(right(idnumber,2),2) AS SEX FROM p2p_member_security info, p2p_member getip WHERE 1 and info.uid = getip.uid and idnumber != ” and idnumber is not null and (length(idnumber) = 18 or length(idnumber) = 15) ORDER BY […]

how to share you ssh via putty through sock v5 for other users in LAN

First of ALL. You have 1\A SSH account to connect to HOST(H). 2\A client(computer–Mac or Windows or Linux). This one called P for proxy client 3\A client(computer–Mac or Windows or Linux, cellphone, xbox360, ps or some device) without SSH but just only proxy. In this example below I called this device C. To using web […]

How to use vpn via different route by one script automatically.

首先感谢github 上的 下面的脚本只是为了我这类懒人而写的纯傻瓜操作且仅限Mac用户。其他平台请自行参照项目地址中的说明文件. 备注, 此bash会在你的/etc/ppp下面生成两个文件. 也就是这两个文件会使你的访问分流. 并且最好定期更新这两个文件. 保存并执行下面的bash即可. #!/bin/bash #auth:Simon export tmpDirForVpnController=/tmp/tmp.route.vpn.dir export downloadFileAddress=’’ function checkFiles { echo ‘checkFiles…’ if [ ! -d $tmpDirForVpnController ];then echo ‘folder no found, create it’ $tmpDirForVpnController mkdir -p $tmpDirForVpnController; fi cd $tmpDirForVpnController if [ ! -d chnroutes-master ]; then if [ ! -f ]; then downloadPackage fi […]

[Fix]Cannot search by using address bar of chrome/chromium

最近应该是BAIDU的搜索URL做了一点小修改导致Chrome/Chromium无法直接在地址栏中&划词使用默认搜索引擎搜索。 修改方法如下 0\ 依次打开 0.1设置settings 0.2搜索引擎 search/Manage search engines 0.3找到百度Baidu 1\修改下面的语句 1.1{inputEncoding}&wd=%s 为 1.2{inputEncoding}&wd=%s 注意加粗部分可能不同,但只要修改为1.2中加粗部分即可 EOF.