2019年12月2日 星期一

C10k 問題:只是面對單一server 需要面對1萬個client k的問題

https://medium.com/@chijianqiang/程序员怎么会不知道-c10k-问题呢-d024cb7880f3

http://inspiregate.com/internet/host-setting/434-unix-c10k-problem-and-libevent-introduction-to-libraries.html

2019年11月11日 星期一

Failed to launch Splunk with error "Validating databases (splunkd validatedb) failed with code '1'."

Recently I moved my previous Splunk db from my old laptop to the new one.  There is an error "Validating databases (splunkd validatedb) failed with code '1’.”” When I tried to launch the Splunk.  After did some googling, I found it was caused by file locked.  The solution is to append the following configuration option to  $SPLUNK_HOME/etc/splunk-launch.conf:

#########################

OPTIMISTIC_ABOUT_FILE_LOCKING = 1

2019年10月28日 星期一

2019年10月9日 星期三

Mac 10.15 only support x64 application: 如何檢查MacBook 應用程式是x32

1. 使用 spotlight command line

mdfind "kMDItemExecutableArchitectures == '*i386*' &&
kMDItemExecutableArchitectures != '*x86*'"

2.從系統報告內的軟體,使用64位元欄位做sorting

2019年9月20日 星期五

Asciidoctor-pdf

asciidoctor-pdf -o asciidoctor-diagram -D generated slides.adoc

 

產生pdf 檔案在 generated folder下面

2019年8月30日 星期五

Facebook 登入地點資訊落差

昨天從我的line然後點選連結要去facebook按讚,登入後就收到異常登入警告,然後顯示的登入地點是高雄,單當時我人在台北,好奇用smartwhois 查了一下,ip的確是台灣大哥大註冊的資訊,但facebook顯示的geoip location 卻顯示是高雄,然不成facebook得到的資料是有包過gps的回傳資料,而非單純從註冊ip來的資料


2019年7月23日 星期二

如何驗證SSL certificate 過期?

1.簡單的使用openssl 確認

#echo | openssl s_client -connect [Host]:[Port] 2>/dev/null | openssl x509 -noout -dates

 

2.使用如下的 shell script 去檢查大量的FQDN

 

./ssl-cert-check.sh -f ssldomains.txt

2019年7月12日 星期五

Multiple access schemes: FDMA/TDMA/CDMA

TDMA : 

required large frequency gaps to reduce interference

CDMA: code division multiple access

使用不同的code去做展頻

share the same frequency and communicate at the same time

*. Challenges to commercialize CDMA

區塊鏈的網站

https://www.ratingtoken.net/about?hl=zh-TW

2019年7月9日 星期二

「開山里」在哪?為什麼會全台灣的人都收到登革熱警訊通知

首先你要先了解什麼是PWS 跟CBS

PWS: Public Warning System  災害防告警系統

CBS: Cell Broadcast Service 災害防告警細胞廣播訊息服務

簡單的說,PWS是政府建立的災害警報系統,技術上就是透過電信業者建立CBS達到將訊息傳送給特定區域的人,理論上可以限制示警單位

1)行政區代碼:

www.dgbas.gov.tw/public/data/dgbas03/bs1/行政區域及村里代碼/.../村里-all.pdf

2)多邊形區域

3)圓形範圍(中心在標點+半徑大小)

一般來說規定部會應該用他們專屬的帳號密碼透過https 連到,NCDR CBE Alert Gateway去發送,然後Alert Gateway 會透過CMSP Gateway 以專線鎖定IP,所以個人覺得這次人員因素出錯的機率偏多

2019年7月5日 星期五

Sparse file support in APFS

sparse files (稀疏檔案),意指如果檔案大小為0,並不會實際佔用硬碟大小 所以以docker.raw檔案在MAC OS就會有不同的硬碟大小

如果用ls -alh. Docker.raw 會顯示佔用60GB

但如果用du -sh Docker.raw可能實際上只有35GB

 

2019年6月18日 星期二

Facebook 疑似被入侵的處理

今早我的email 信箱收到一封信,要我輸入一組密碼來登入Facebook, 但我很明確那不是我,
一開始懷疑是不是釣魚信,但看一下寄信的資料確定不是釣魚信,就趕緊登入Facebook
然後到我的帳號安全與登入頁面去查看登入的裝置,果然發現有一台來至於高雄的iphone 6 plus 手機嘗試登入,當滑鼠點到他時,會出現該裝置的ip,用Geoip查詢一下是威寶電信註冊的ip,現在是台灣之信在使用,目前尚不確定或是說不知道如何繼續追蹤下去,










https://www.geoip.co.uk/

2019年6月13日 星期四

Difference between data warehouse and data lake

The major difference is data warehouse only store  the data which were  precessing.  The data lake is store all data.   In recent mindset change of data store is all data are valuable.  Don’t need to extractor  the data before stored them.  Data lake can help to deal with

1) non structural data

2) data storage cost...

3) don’t need schema.  The schema only adopt when read them.

 

Forbe identifier 4 mature level in his article  of The data lake Dream

1) No hadoop

2)with hadoop

3)all data parking in hadoop

4)Enhance data security and data governance 

2019年6月4日 星期二

An introduction of networking terminology: Interfaces, protocols and service

In OSI reference model, it has clear define “interfaces, protocol and service"

 

Interface:   

Interfaces are networking communications points for your computer. Each interface is associated with a physical or virtual networking device.

 

Protocol.

Protocol usally in the same layer

 

Services:

The entities in layer implement a service used by layer n+1.

Layer n : service provider.

Layer n+1:service user

 

2019年5月30日 星期四

如何調整root partition. (Kali Linux)

參考網頁:https://www.rootusers.com/use-gparted-to-increase-disk-size-of-a-linux-native-partition/

最近在安裝Kali Linux 做測試時,發現預設的/root partion 空間很小,幾乎沒辦法再透過apt-get 去做更新

想要使用GParted 調整,卻一直失敗,後來發現是因為partiotion 已經被mount的關西,所以最好的做法

就是使用liveCD的方式去執行partition 更動

2019年5月28日 星期二

Kali linux 執行更新後變成黑頻

How to resolve grey screen after upgrading Kali linux

https://unix.stackexchange.com/questions/448093/kali-linux-goes-to-grey-screen-after-log-on-fresh-install

2019年4月25日 星期四

Best Practice: Prefer ELT over ETL

E: Extract

T:Transform

L:Load

 

傳統的資料處理推薦: ETL,  Extract transform Load ,但google big query 推薦的為 Extract Load transform 

先把資料全部倒入big query 然後之後有需要再處理

2019年4月18日 星期四

[MAC] 如何找出開機的程序

1.開啟活動監視器,找出開機的程序,選者 查看所有程序的資訊(上面的!)
2.找出裡面是誰,以這個案例,就是開機登入選項幫我開啟郵局的ATM


3.另外還有兩個MAC開機時會跑的路徑
/Library/LaunchAgents
/Library/LaunchDaemons/

2019年3月13日 星期三

2019年3月11日 星期一

[MAC] Use hostname to mount Samba on Mac

1.  Use dns-sd to list all samba server

#dns-sd. -B _smb 

 

2. Connect to the specific samba server

#dns-sd -L "Windows 7" _smb

ATE: ---Mon 11 Mar 2019---
14:22:13.888 ...STARTING...
14:22:13.888 Windows\0327._smb._tcp.local. can be reached at localhost_prl.:65221 (interface -1)

 

3. It means you can reach samba on the localhost_prl:65221 port

2019年3月5日 星期二

Smartgit 一直跳出要你輸入rsa key的密碼

後來發現只要把key 加入到ssh-agent 即可解決這個問題

$ ssh-add ~/.ssh/id_rsa
Identity added: /Users/User/.ssh/id_rsa (/Users/User/.ssh/id_rsa)

@ mbp in ~/.ssh [10:47:18]
$ ssh-agent -s
SSH_AUTH_SOCK=/var/folders/v5/_wxtsm_x74jg_nxv85hxy4jm0000gn/T//ssh-X4OEgMhibpCi/agent.6591; export SSH_AUTH_SOCK;
SSH_AGENT_PID=6592; export SSH_AGENT_PID;
echo Agent pid 6592;

2019年1月31日 星期四

解決macOS Mojave 10.14打開應用程式已損毀無法打開,你應該將其丟到「垃圾桶」方法

其實主要的原因是因為軟體的開發者沒通過App store的認證,如果要執行的話就是得先關閉允許從以下來源下載的App

## 關閉

sudo spctl --master-disable

 

##開啟

sudo spctl —master-enable

2019年1月30日 星期三

What is Telemetry data?

Telemetry 指的是軟體自動收集或測量來幫助軟體公司的數據,GDPR關於這塊也有明確的規範

2019年1月18日 星期五

Need to remove flaky test case from automation

Because they are untrusted.  The purpose of test automation should focus on finding the change , not find the bug.

Measurement vs. Metrics

Measurement   通常是只可以測量的絕對值,metrics 則是比較兩個以上相同的產品或對象

2019年1月11日 星期五

SOC: EDR, MDR and XDR 的差別

EDR: Endpoint Detection and Response

MDR: Managed Detection and Response

XDR: Cross Detection and Response

從字面上來看,就是EDR是從終端點,就是類似個人pc或手機等端點發起的偵測與回應,但MDR則是比較偏向

整體的strategy 去針對安全偵測與回應,XDR則有點像是下一代,就是需要跨個端點,包含網路,個人電腦,

甚至Saas service provider等作全面性的預防與偵測

入手百樂 Dr.Grip 4+1的多色筆

以前曾經分享過GTD中,五色筆管理法,用過幾款多色筆,但都沒這次入手的好用,雖然頗貴,

一隻280新台幣,關於使用就需要更換筆芯,但自動鉛筆的筆芯就需要把筆管旋開,然後把自動鉛筆的

筆頭轉開,再把自動鉛筆筆芯放進更換,還不錯用

2019年1月9日 星期三

自己更新Synology NAS 的youtube-dl 來解決有時候遇到youtube 下載會失敗的問題

1. Enable ssh on NAS server

2. Logon NAS through ssh

3. Download a youtube video

4. Search process from terminal :  ps -axw|grep youtube

5. You will see the below command line 

6. If the issue was caused by youtube-dl, you can just try to upgrade it 

  #cd /var/packages/DownloadStation/target/plugins/youtube

  #./youtube-dl.  —version.         ( check version of youtube-dl)

  #./youtube-dl -U.   (Upgrade youtube-dl)

 

 

NewImage

2019年1月3日 星期四

Anki 工具介紹: Google Chrome add-on: Anki quick adder

Add on : https://chrome.google.com/webstore/detail/anki-quick-adder/gpbcbbajoagdgnokieocaplbhkiidmmb

當你在網站上查資料遇到生字,我在MAC上面的做法,第一個就是使用三個手指點選查詢單字,如果想把他

記錄到單字簿,以前的動作就是要例外寫道anki上,裝了這個add on 後,就可以直接在瀏覽器上操作,直接把

生字做個紀錄

NewImage

How to restore a deleted onenote page

復原不小心誤刪的onenote