目前分類:未分類文章 (79)
- Sep 24 Wed 2014 17:13
Linux 刪除大量檔案
- Sep 23 Tue 2014 15:06
sudo without password
- Sep 19 Fri 2014 14:17
nginx proxy status
http://wiki.nginx.org/NginxHttpUpstreamModule#.24upstream_response_time
https://rtcamp.com/tutorials/nginx/upstream-cache-status-in-access-log/
https://rtcamp.com/tutorials/nginx/log-parsing/
log_format rt_cache '$remote_addr - $upstream_cache_status [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent"';
- Sep 19 Fri 2014 11:03
nginx rotate log file hourly
http://nginx.org/en/docs/control.html#logs
http://www.jeffmould.com/2013/10/24/rotate-nginx-log-files/
#vi rotate_log.sh
- Sep 17 Wed 2014 09:44
AWS RDS Replication error
參考
Read Replica Replication Error - SQLError: 1062, reason: Error 'Duplicate entry '312626' for key 'PRIMARY'' on query. Default database: 'urstylecomtw_search'. Query: '-- MarsZ: insert into cosme_review ( crv_seq,crv_fid,crv_sid,crv_pseq,crv_memid,crv_member_active_exp,crv_skin,crv_age,crv_evalues,crv_evalues_weighted,crv_comment,crv_comment0,crv_date,crv_situation1,crv_situation2,crv_situation3,crv_situation4,crv_situation5,crv_situation6,crv_situation7,crv_situation8,crv_situation9,crv_situation10,crv_situation11,crv_situation12,crv_poll_1,crv_poll_2,crv_accuse,crv_product_type,crv_product_obtain,crv_used_repeat,crv_poll,crv_ip,pics_count,crv_unverify_num,crv_reply_num,crv_prevreplydate,crv_lastreplydate,review_pageview_final,cosme_reviewcol,crv_product_weather) value( ' 312626 ' , ' 37 ' , ' 5899 ' , ' 13971 ' , ' 49102 ' , ' 61 ' , ' 4 ' , ' 18 ' , ' 4 ' , ' 4 ' , ' ?????????\r\n?????????\r\n\r\n????????\r\n\r\n????????r\n??????????????\r\n??????O??
主鍵重複,只能跳過這筆的備份
mysql> call mysql.rds_skip_repl_error;
+-------------------------------------------------+
- Sep 16 Tue 2014 17:16
SSH採用公鑰認証
情況:A SSH 到B不要輸入帳號密碼
先在B上把/etc/ssh/sshd_config中
PasswordAuthentication no
#service sshd restart
- Sep 16 Tue 2014 15:50
rsync over ssh
rsync -az -e 'ssh -p 22' root@1.1.1.1:/var/log /tmp
紅色部分為來源端SRC
藍色部份為目的端DST
黃色部份可以加任何參數
例如透過SSH做同步
- Sep 16 Tue 2014 15:46
MySQL指令
mysql -h hostname-P 3306 -u root -p
進行連線
mysql> show status like "Qcache%";
mysql>show variables;
- May 12 Mon 2014 22:59
PHP物件導向
在網路上發現有關PHP OOP一系列的好文章
PHP物件導向的第一堂課
PHP物件導向的第二堂課
- Nov 14 Thu 2013 11:02
CubieBoard-Cubian
- Apr 15 Mon 2013 11:00
acpi tz0 ; TMP value is absurd
- Oct 29 Mon 2012 16:40
ZFS 修復 示範
- Jan 30 Mon 2012 14:47
vi 搜尋到的行 整行刪除
- Apr 28 Wed 2010 10:38
Winrar 功能分享
感謝 logs @ ptt 分享
- Feb 04 Thu 2010 09:50
Malware
「Malware」指的是「Malicious Software」,又稱為惡意程式、流氓軟體或黑心軟體,就像你吃了砒霜可能會馬上掛點,但是吃了黑心食品卻不一定會馬上出事一樣。「Malware」 的危害可能不如一般病毒程式般危急,但一般防毒軟卻也不一定可以偵測得出是否有「Malware」潛伏在電腦中
- Jan 14 Thu 2010 11:43
相機畫素 換算 檔案大小
- Jan 11 Mon 2010 18:08
TinTin++
#ACTION {^【 氣 血 】%s%1/%s%2%s(%*【 內 力 】%3 /%s%4 (%*} {#math {x} {%4*2};#math {x} {$x-100};#if {%3<$x} {exercise %1;#TICKER {ex} {hp} {20}};#else {exercise 20;#TICKER {ex} {hp} {5}}}
-------------------------------------------------------------------
#action {^【 精 氣 】%s%1/%s%2%s(%*【 精 力 】%3 /%s%4 (%*} {#math {x} {%4*2};#math {x} {$x - %3};#if {$x>%1} {tuna %1;#TICKER {ex} {hp} {20}};#elseif {%1>80} {tuna 20;#TICKER {ex} {hp} {5}}}
-------------------------------------------------------------------------------------------------
/*
- Dec 25 Fri 2009 17:08
真假蜂蜜的辨識方法