程式設計週記[2016/10/21]: 優秀的創意到產品間存在著巨大的鴻溝,需要不斷的努力與調整

這是什麼? 程式週記主要內容如下: Gihub project 介紹: 主要會貼一些github,但是會盡量寫上一些有用的評語(或是我容易想到的關鍵詞)幫助以後查詢 網路文章心得: 會寫些心得,強迫自己閱讀. “程式週記”並且定期週期性更新. 大部分內容在我的twitter都會有,這邊只是將一些簡單的心得與感想註解一下. 本週摘要 工作上許多事情排擠我學習的時間,時間太少只好犧牲掉睡眠時間來學習與寫代碼. 神是公平的,不論你的種族與性別.他都只給你 24 小時,你要把時間花在哪些地方,成功就在哪些地方. (半夜醒來,發現一堆大大已經在努力學習有感) 下週三要有 Golang Taipei 聚會,希望大家都來參加啊. 沒有票的可以來找我拿閃電秀的票(前提是來當講者 :p ) Go redspread/spread : Docker to Kubernetes in one command https://redspread.com 透過 git-like 的指令能夠部署 Docker 跟 Kubernetes , RedSpread 提供相當方便的指令來部署你的服務. 最近 RedSpread 加入 CoreOS 了…. CoreOS 越來越多 Go 的大專案 Why you should not use iris for your Go projects Iris 是一個號稱地表上最快的 Web Framework,擁有 5000+ star 的專案,但是想要申請 Awesome-Go 卻被 ban 掉的整個故事. 這篇文章,從多個角度建議你不應該把 Iris 當作你的專案中,故事精彩就直接看內文吧. 懶人包: Iris 被 Awesome-Go 移除 Iris 的 Kataras 申請重新加入. 被人發現把 PR 改掉,License 亂寫 被 Awesome-Go 拒絕並且 Ban 掉 Kataras 把 Iris commit 改成只有兩個 (哪招?) Kataras 修改自己在 git issue 裡面的發言 參考 : Awesome-Go Github PR mesosphere/mesos-dns : DNS-based service discovery for Mesos 各種 Cluster Orchestration 軟體 (mesos or kubernetes ) 都會內建一套有用的 DNS . Mesos 用的就是這套的 mesos-dns ,而 Kubernetes 就是會逐漸轉向使用 SkyDNS. 有趣的是兩套都是 Golang 寫的. go-vgo/robotgo : RobotGo,Golang Native cross-platform system automation 這個很實用啊.跨平台的自動化系統.. (滑鼠精靈,自動點擊)都可以用 #### https://github.com/campoy/go-web-workshop Francesc Campoy...
繼續閱讀

程式設計週記[2016/10/14]: Learning how to using Machine Learning

這是什麼? 程式週記主要內容如下: Gihub project 介紹: 主要會貼一些github,但是會盡量寫上一些有用的評語(或是我容易想到的關鍵詞)幫助以後查詢 網路文章心得: 會寫些心得,強迫自己閱讀. “程式週記”並且定期週期性更新. 大部分內容在我的twitter都會有,這邊只是將一些簡單的心得與感想註解一下. 本週摘要 小孩子得了腸病毒,在家休養了一個禮拜.每天都在學習機器學習 (好像回文). 這次竟然花了兩個禮拜才整理出來,下週要改進. Go sourcegraph/checkup : Distributed, lock-free, self-hosted health checks and status pages checkup 是一個 #golang 專門拿來做應用程式健康檢查 (Health Check) 用的工具. 你可以使用 JSON 定義要檢查的應用程式網路與方式 (TCP/HTTP) 然後使用 CLI 的方式來執行. 也提供直接在 Programming 處理的方式. 支援 HTTP, TCP (並且支援 TLS) 與 AWS S3. 運用層面相當廣泛的好工具… 他們也寫了篇部落格來解釋他們為何需要自行研發這樣的產品. Why we open-sourced our uptime monitoring system heetch/LAPJV: Go implementation of the LAPJV algorithm 這個用來解決 Assignment Problem (任務指派問題)也就是將 n 個工作分配給 m 個人如何達到最大的有效的分配方式的問題. 一般而言的解決方式會是透過匈牙利演算法,而這段代碼使用了另外一個方式 Liner-Assignment-Problem Jonker-Volgenant algorithm 來大大的提升計算效能. 似乎無法找到論文(要錢),不過這邊有稍微講到如何做到 LAPJV . astaxie/bat : Go implement CLI, cURL-like tool for humans 類似 httpie 使用 Golang 作出的 CLI curl 工具。 這個套件的作者 Asta Xie 也就是 BeeGo 的作者. 參考 Httpie 重新以 Go 來打造的工具,使用了 Go Routine 讓整個軟體更加具有效能. noqcks/gucci : A simple cli templating tool written in golang noqcks/gucci 使用 #golang 寫的 template 工具。 可以透過樣板的替換方式,來讀取系統變數或是執行結果。 EBOOK : Webapps in Go (without) framework 免費的 #Golang Ebook ,使用最基本的 built-in package 來建置 Go Web App.還有 Go 語言的基礎教學,還不錯的書籍. pygo:...
繼續閱讀

[Kubernetes] Authorization and Admission Survey

This slide show some note about Authorization and Admission in Kubernetes. It include some detail about: Authorziation ABAC RBAC Admission Service Account Secret Link About Authenication: Still working understanding how to do Authenication in Kubernetes. Using access tokens to secure microservices API Security: The 4 Defenses of The API Stronghold How To Control User Identity Within Microservices Microservices in Practice Adding an OpenID Connect identity provider OpenID Connect FAQ and Q&As SCIM: System for Cross-domain Identity Management
繼續閱讀

[GCPUG] 參加 GCPUG + Flink 小筆記

前言 話說強者我同事 Simon Su 是 GCPUG 是主辦者. 當然還是得特地跟老婆請假來彭場一下,加上本週有不少資料科學相關的講題. 1. Apache Beam in Big Data Pipeline by Randy Huang - Data Architect at VMFive Why use beam? If you want to decompose your task into pipeline. You can focus on algorithm. It could run on Flink, Storm and Spark. So you can write code once run anywhere. Q&A What is the pain point if such application has so much runner? (spark, flink, storm) Ans: No, pain point until now. Sometime CEP for Flink but might not able to use in Beam. Beam is follow Flink related API closely. Related Link: Beam website Embulk: Pluggable Bulk Data Loader. 2.Kubernetes 使用心得分享 by Gene Liu / LIVEhouse.in Self healing in second. Master will use 0.4 CPU in etcd. Q&A Is any way to assign random port in Kubernetes Cluster if we want to run random replica? Ans: Use node pool Why use kubernetes? Ans:...
繼續閱讀

[Kubernetes] 透過 Kubernetes 1.4 新功能 Kubeadm 來建立 Kubernetes Cluster

緣起 2016/09/26 Google 推出了新版的 Kubernetes 1.4 裡頭最讓人期待的,就是 kubeadm 這個新的功能. 本來很期待他能夠讓 Kubernetes 變得更容易安裝並且加入新的節點,所以就試玩了一下.發現功能都還蠻強大的.不僅僅是變得更容易安裝,其實根本就是跟 docker swarm mode 致敬啊.整個變得簡單到不行. 建立機器 這邊只建議兩個 OS 版本: Ubuntu 16.04 CentOS 7 備註: 如果你使用 docker-machine 來建立 VM 獲釋 GCP 上面的機器,預設的 Ubuntu 是 15.10 ,是無法順利安裝完畢的. 下載相關的 binary 每一台電腦(包括 Master 跟 Node 都得執行)所有的指令都是透過 sudo su - # curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - # cat <<EOF > /etc/apt/sources.list.d/kubernetes.list deb http://apt.kubernetes.io/ kubernetes-xenial main EOF # apt-get update # apt-get install -y docker.io kubelet kubeadm kubectl kubernetes-cni 啟動 Master 就像是 docker swarm mode 的 master 一樣,只要一行指令就好. kubeadm init 詳細會出現的螢幕如下 # kubeadm init <master/tokens> generated token: "306d01.da88f33b20103873" <master/pki> created keys and certificates in "/etc/kubernetes/pki" <util/kubeconfig> created "/etc/kubernetes/kubelet.conf" <util/kubeconfig> created "/etc/kubernetes/admin.conf" <master/apiclient> created API client configuration <master/apiclient> created API client, waiting for the control plane to become ready <master/apiclient> all control plane components are healthy after 51.538064 seconds <master/apiclient> waiting for at least one node to register and become ready <master/apiclient> first node is...
繼續閱讀

[Linux] Summary how to retreival system info

Data Q&A How to get disk and network stat? Try to usse sar (detail usage) How could I get GPU info? Try to use glxinfo (detail usage) How to get OS version? Checking your Ubuntu Version You also can get other detail on /proc (detail spec), such as: cpu memory process info (id, usage, … other) DMA info Other Links How to get GPU info? 10 Useful Sar (Sysstat) Examples for UNIX / Linux Performance Monitoring Checking your Ubuntu Version /proc spec
繼續閱讀