跳到主要內容

發表文章

[MV] 我心中尚未崩壞的地方

有天發現自己竟然成了片場裡的小丑。 小丑幸運的走上了舞台還發現了光。 但光是短暫會熄滅的,只能不停的尋找更大更亮的光。 小丑找到越來越亮的光,直到被強光灼傷.... 受傷的小丑又找到了一種淡淡的光,卻還是熄滅了。 最後小丑發現其實即使沒有光,只要他想表演,哪裡就是他的舞台。 小丑是在追求光,還是在尋找舞台?

Google Cloud OnBoard 2017 Taipei

Google Cloud Platform Per minute billing Sustain pricing: 25% 自動提供折扣 (20% each 25% usage) Compute Engine: customize CPU and memory (add more memory) Committed discount (1 year or 3 year) CloudNative use cases Free trial 300 USD (1 year valid) IAM Google Account / Service Account / Google Groups / G suites accounts Organization? App Engine Similar to AWS BeansTalk or AWS Container Service  Cloud Shell / edit / preview (Very nice integration with browser!!)  Standard environment / Flexible environment (provides ssh)  PaaS, auto scale, container Eclipse wizard integration Cloud Datastore Similar to AWS DynamoDB? Encryption / Sharding / Replication NoSQL  Auto scaling Billing Free 28 instance hour? / cost calculator  Cloud Storage Similar with AWS S3 (bucket / region / storage type by access frequency) < 5TB BLOB GB / per month (granular: minute) Multi Regional 0.026, Regional Nearline(1 time / month)0.01, Coldline (1 ...

AWS Machine Learning Workshop

Machine Learning Concepts Apply AWS ML to problems you have existing samples of actual answers For example, to predict if new email is spam or not, you need to collect examples of spam and non-spam. Binary classification (true / false) Is spam or not spam, churn, will customer accept campaign? Multiclass classification (one of more than two outcomes) Regression (numeric number) Building a Machine Learning Application Frame the core ML problems Collect, clean and prepare data Features from raw data Feed to learning algorithm to build models Use the model to generate predictions for new data Linear Models Leaning process computes one weight for each feature to form a model that can predict the target value For example, estimated target = 0.2 + 5 * age + 0.00003 * income Learning Algorithm Learn the weights of the model Loss function: penalty when estimate target provide by the model not equal exact result Optimization technique: minimize the loss (Stochastic G...

why create at least two subnets in different AZs is a must have practice?

今天遇到了一個有趣的問題,在 AWS VPC 裡要 create RDS DB instance 遇到了一個無解的問題。 原本的 VPC 規劃時只有兩個 subnet,而且無法再加進其他 subnet。 VPC CIDR: 192.168.1.0/24 Subnet 1 CIDR: 192.168.1.0/25 Subnet 2 CIDR: 192.168.1.128/25 更悲劇的是,這兩個 subnet 都是屬於同一個 Availability Zone (AZ)..... 雖然在 VPC 裡 create RDS instance 時可以選擇 "Multiple AZ deployment = No" 但接下來卻還是一定要 create DB subnet group. 而 DB subnet group 則是至少要有兩個 subnet 要在不同的 AZ, 我原本以為如果我選擇只要 single AZ deployment,那 create DB subnet group 應該就不是必要的,但看起來 AWS 是不允許的。去翻了一下 Working with an Amazon RDS DB Instance in a VPC 第一條真的寫了 " Your VPC must have at least one subnet in at least two of the Availability Zones in the region where you want to deploy your DB instance. A subnet is a segment of a VPC's IP address range that you can specify and that lets you group instances based on your security and operational needs. " 雖然我不知道怎麼只有一個 subnet 但是可以有兩個 AZ,但就我的理解應該就是指,你的 VPC 下要有兩個以上的 subnet,然後至少有兩個 subnet 是屬於不同 AZ。 這個故事告訴我們: 創建 VPC 時,可大,不可以小。雖然目前只有兩個 su...

全漢金鈦極重開不能說的秘密

從接觸第一台電腦486DX2-66,國中的時候第一次用撥接上學校 BBS站,一直到工作,都還是習慣掛在 BBS 站看文章。 身為一個電腦宅,當然就是不停地看新產品介紹/使用心得,然後不知不覺的手癢想組裝/升級電腦,這樣一直無限循環下去。 大學時期曾經歷過建國商場風光的歷史,工作後大部分就是靠原價屋和PChome24小時手滑買東西拼拼湊湊一路走來。 每次要組電腦前都還是會參考網友的建議,回顧一下自己的電腦菜單 2010.05 全漢 400w 藍寶石2 2010.08 全漢 400w 藍晶鑽2 2011.11 BQT 400w STRAIGHT POWER E6 2013.06 全漢 400w 金鈦極 因為我只是輕度電玩使用者,大部分用電腦都是上網,所以偏愛使用內顯,也很在意零件消耗的功率,所以 400w 的電源實際使用的功耗大多在 100w 上下。 在金鈦極之前,遇到重開根本都不會想到會是 Power 問題,第一反應都是先懷疑作業系統/驅動程式/過熱/記憶體還是主機板 但偏偏就在金鈦極400w這顆 Power 時,偶然發現換回備用的 Power 就沒事了!第一次因為還在保內可以直接換新,換新品後使用就都正常。過了一年多後重開機又再度發作,但是這次因為有之前的經驗,沒有浪費時間,馬上換回備用的 Power 測試,確定不是主機板的問題後就送修,送修回來的良品使用到現在也還正常。 我願意接受 3C 產品有不同的設計和用料,當然也有不同的良率或者耐用度問題。而全漢之前給我的印象也都還可以( 舊的 Power 都還在服役中或者當備料),第一年可以快換,之後送修也不囉唆,送修沒多久就寄回一個良品。我本來也不太想計較用金鈦極快三年,發生了兩次因為重開機要送修的問題。 只是最近剛行看到有人在 PC_Shopping 版提到,金鈦極重開,所以大家開始簽到,有些碰到重開機的苦主就上去回覆了,當然有些人也是說使用正常,而我也上去回了我的經歷。 沒想到這才是傳說的開始。 文章的推文開始有人說,是不是使用者主機板的問題?環境太潮濕,台灣電力不穩,這是自動保護機制。但這都不能解釋為什麼相同的環境,主機板沒換,Power送修回來後,卻都可以再正常使用一段時間。 接下來還有一些更誇張的推文出現,說一直送修,會不會是使用者自己的問題?有的還...

Import SSL certificate into JAVA keystore

 General speaking, when you want to apply SSL to web server, you will have below files in hand: private key for SSL certificate sign request  signed SSL certificate Root CA certificate  Intermediate CA certificate (optional) For importing a trusted certificate into JAVA keystore, I think create a new keystore and replace the original one seems like a good practice.  I believe you will know how to import Root CA and intermediate CA as trustcacerts into keystore. However, if you only import the signed SSL certificate without the private key, then the entry will treat as "TrustCertEntry" instead of a "PrivateKeyEntry". The tomcat server will start and listen to 443 but will refuse to serve connection. Therefore we need to use openssl to combine the signed SSL certificate and private key as PKCS12 format. Then import the PKCS12 format entry into the keystore. openssl pkcs12 -export -in FQDN.crt -inkey private-ssl.key -certfile  FQDN...

automation testing

我覺得 想想自動化測試-開始(一) 的論點很不錯.... 原則 1: 針對重點業務,進行回歸的自動化測試 原則 2 :針對穩定的業務(或接口),在環境比較穩定的情況,前期投入腳本開發,有利於減少後期維護成本 原則 3 :自動化測試主要是為了保證主要功能完整可用,而不是為了多發現缺陷 原則 4 :自動化測試並不能減少測試的人力成本,而是為了加快測試反饋,提升測試質量 原則 5 :不要對錄制回放抱有幻想了,可視化也不是一個好的想法 原則 6: 開發參與自動化測試,讓開發和測試融合在一起 什麼都想做,就什麼都做不好。 確保主功能沒問題,就可以釋放出人力在其他事情上, 也可以控制意外的損害範圍… 千萬不要期待 automation 可以發現新問題…