Python 宣佈將會搬到 GitHub 上:「[core-workflow] We will be moving to GitHub」,而目前應該是在 Mercurial 架的「Python.org Mercurial repositories index」上。
看討論有很多反對意見啊...
幹壞事是進步最大的原動力
Python 宣佈將會搬到 GitHub 上:「[core-workflow] We will be moving to GitHub」,而目前應該是在 Mercurial 架的「Python.org Mercurial repositories index」上。
看討論有很多反對意見啊...
AWS 推出的工具,可以阻擋 AWS 的 Key 被傳到 Git 上:「awslabs/git-secrets」。可以看到說明:
git-secrets
scans commits, commit messages, and--no-ff
merges to prevent adding secrets into your git repositories. If a commit, commit message, or any commit in a--no-ff
merge history matches one of your configured prohibited regular expression patterns, then the commit is rejected.
算是小工具...
很久前是用 tpcc-mysql 測試 MySQL 效能:「用 tpcc-mysql 測試 LSI 的 Nytro MegaRAID NMR 8100-4i」,最近剛好又有測試需求,想說拿來學個新玩具測試,就想到 sysbench 的 oltp 測試。
先用 Google 找了找測試的方式,appleboy 之前寫的「Sysbench 測試 Percona XtraDB Server 效能」算是還不錯的文件,就拿來當起點了。
我是拿 AWS 測試,主要是因為幾乎所有的效能都是固定的,這樣測出來才有意義。
Amazon EC2 用 c4.8xlarge,用 10Gbps 網路測試會比較準確一點。硬碟的部份是掛上 100GB 的 SSD 硬碟,如果是測 I/O bound 的人就選擇有固定 IOPS 的 Provisioned 版本,但我這次測的都是 CPU bound,就只選用 General 版本了。
跑起 Ubuntu 14.04 後直接用 apt-get install sysbench
就可以裝起來了。
Percona 的 apt repository 設定可以參考官方的「Installing Percona Server on Debian and Ubuntu」這篇文章。設好後要裝什麼版本測試就是自己的選擇了。
都裝好後,測試的方式是先用 prepare 塞資料,再用 run 測試。
這是 prepare 部份的指令:(粗體字的 x 需要帶入自己對應的參數)
sysbench --test=oltp --db-driver=mysql --mysql-engine-trx=yes --mysql-table-engine=innodb --mysql-host=x --mysql-user=x --mysql-password=x --oltp-auto-inc=off --test=/usr/share/doc/sysbench/tests/db/oltp.lua --oltp-table-size=10000000 prepare
這是 run 部份的指令,我這邊用了 --oltp-read-only=on
只測 read transaction 的速度:
sysbench --test=oltp --db-driver=mysql --mysql-engine-trx=yes --mysql-table-engine=innodb --mysql-host=x --mysql-user=x --mysql-password=x --oltp-auto-inc=off --test=/usr/share/doc/sysbench/tests/db/oltp.lua --oltp-table-size=10000000 --oltp-read-only=on --num-threads=256 --report-interval=5 --max-time=60 --max-requests=0 run
大致上就是這樣測,然後用 gnuplot 畫圖。
GitHub 給了從 2008 年到 2015 年現在,放在 GitHub 上專案所使用程式語言的排名:「Language Trends on GitHub」。
這同時包括了公開與私人 repository:
The rank represents languages used in public & private repositories, excluding forks, as detected by Linguist.
可以看到 Java 專案的排名逐步上升,應該是愈來愈多 Java 專案放到 GitHub 上 (應該是跟 Android 有關)。而 Perl 是掉出去很久了,PHP 則是萬年不動... XD
GitHub 的公告:「Keeping GitHub OAuth Tokens Safe」。
當你不小心把 GitHub 的 OAuth Access Token 推到 GitHub 的 public repository 時,站方會自動 revoke 掉:
Starting today you can commit more confidently, knowing that we will email you if you push one of your OAuth Access Tokens to any public repository with a git push command. As an extra bonus, we'll also revoke your token so it can't be used to perform any unauthorized actions on your behalf.
保護使用者在使用 GitHub 自家的產品。
Ubuntu 12.04 上的 Chromium 一直都是 18.0 版,而 "Chromium Builds" team 也沒在更新了...
過一陣子想起來就會去找一下,結果剛剛發現有人在 Launchpad 上面丟出來了:「New Chromium Stable And Development PPAs For Ubuntu 12.04」,有兩個版本,一個是 stable (目前是 21.0),一個是 dev (目前是 23.0)。
而舊的 repository 可以用 apt-add-repository -r
移除,然後再跑 apt-get update 更新。