跳到主要內容

發表文章

docker run cmd with pipe broken?

半年多前放在 github 裡的 build container Dockerfile 突然有同事拿去用,但我很多細節都忘光了XD 記得之前是用 bind mount 的方式將 git repository 掛進 container 裡面,然後再用 git archive HEAD | tar -x -C /tmp 將 git repository export 到 container 的 tmp 目錄再開始 build 不知道為什麼如果在 host 用一行的方式去執行 tar 會說 broken archive... docker run -it -v $(pwd):/mnt/repo -w /mnt/repo mybuild:latest git archive HEAD | tar -x -C /tmp && cd /tmp && make 但是在 container 裡面執行 archive 再 pipe 給 tar 又都沒問題... 最後是在 Dockerfile 裡用 CMD 執行 default command,這樣也沒問題.... docker run -it -v $(pwd):/mnt/repo -w /mnt/repo mybuild:latest

Disable SMBv1 to avoid EternalBlue exploit in Windows 7

Disable SMBv1 server from windows 7: Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 -Force Disable SMBv1 client from windows 7: sc.exe config lanmanworkstation depend= bowser/mrxsmb20/nsi sc.exe config mrxsmb10 start= disabled References: https://www.saotn.org/disable-smbv1-windows-10-windows-server/  https://github.com/RiskSense-Ops/MS17-010/blob/master/exploits/eternalblue/ms17_010_eternalblue.rb

VMware Linux Guest Introspection Driver

VMware NSX for vSphere 6.3:  Install Guest Introspection for Linux vmware-nsx-gi-file depends on fanotify and vm_vmci kernel modules. Linux Kernel - fanotify 更全面性的檔案監控機制 RFC: VMCI for Linux KB 2073804: VMware support for Linux inbox VMware drivers

Getting start with Golang!

#Get started with Go https://talks.golang.org/2012/tutorial.slide#1 #Go for C programmers https://talks.golang.org/2012/goforc.slide#1 #Share Memory By Communicating https://blog.golang.org/share-memory-by-communicating #Codewalk: Share Memory By Communicating https://golang.org/doc/codewalk/sharemem/ #Go Concurrency Patterns: Timing out, moving on https://blog.golang.org/go-concurrency-patterns-timing-out-and #Go Language for Ops and Site Reliability Engineering https://talks.golang.org/2013/go-sreops.slide#1 #Go Dynamic Tools https://talks.golang.org/2015/dynamic-tools.slide#1 #Program your next server in Go https://talks.golang.org/2016/applicative.slide#1 #HTTP/2 Server Push https://blog.golang.org/h2push #gRPC Basics - Go http://www.grpc.io/docs/tutorials/basic/go.html #Go talks https://talks.golang.org/

[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...