跳到主要內容

發表文章

Google - Cloud SQL for PostgreSQL adds high availability and replication (Google 雲端 PostgreSQL 資料庫新增了 HA & Replicas )

就在本月, 等了好一陣子的 Cloud SQL  for PostgreSQL 終於加上了 High availability & Replicas 機制; 雖然目前還是 beta 版,不過已經讓人開心,想叫老闆跟同事,趕快使用看看。 相關文件 https://cloudplatform.googleblog.com/2017/11/Cloud-SQL-for-PostgreSQL-adds-high-availability-and-replication.html 另外,也今年夏季也加入了 19 項 PostgreSQL extensions 相關文件 https://cloudplatform.googleblog.com/2017/08/Cloud-SQL-for-PostgreSQL-updated-with-new-extensions.html
最近的文章

iOS 11 - 新功能介紹,「螢幕錄製」- 用你的 iPhone 輕鬆錄操作畫面

工作上常要測試公司開發的手機 APP 過往都要把 iPhone 接上 Macbook 才能錄製操作畫面,再分享給相關同事。 現在,  iOS 11 提供了方便的作法。 你可以在 iOS 的「設定」>「控製中心」>「自訂控製項目」裡面 找到「螢幕錄製」這一項,然後按左邊綠圈,加進「控製中心」選單 這樣,你就自由的錄製操作畫面,分享給同事。 或是家中有長輩,不會操作手機時,也可以錄製給他們看。

Goose - a database migration tool for Go 資料庫遷移工具

Goose Go 語言下,好用的資料庫遷移工具。特別是跟同事協同開發時,做好資料庫版本管理的好幫手。除了用 SQL 外,你也可以自己產生對映的 Go 程式。 Goose is a database migration tool. Manage your database schema by creating incremental SQL changes or Go functions. github repo. (程式庫連結) https://github.com/pressly/goose Install (安裝) $ go get -u github.com/pressly/goose/cmd/goose Usage (語法) kz@KZ ~/Blogger/bloggerfiles (master) $ goose Usage: goose [OPTIONS] DRIVER DBSTRING COMMAND Drivers: postgres mysql sqlite3 redshift Examples: goose sqlite3 ./foo.db status goose sqlite3 ./foo.db create init sql goose sqlite3 ./foo.db create add_some_column sql goose sqlite3 ./foo.db create fetch_user_data go goose sqlite3 ./foo.db up goose postgres "user=postgres dbname=postgres sslmode=disable" status goose mysql "user:password@/dbname" status goose redshift "postgres://user:password@qwerty.us-east-1.redshift.amazonaws.com:5439/db" status Options: -dir string dire...

好用的小工具 ngrok

最近工作上因為要測試,有些服務的  port 被防火牆擋住了 同事推薦實用的小工具 ngrok ngrok 官網 https://ngrok.com 裝好後,把你本機開發的服務先帶起來 ( 假設服務起來 listen port 為 3000 ) 下指令 $ ngrok http 3000 然後把它產生的連結,就可以打破防火牆限制,提供給需要的服務啦 對方連過來後,實際畫面

LiveReload 安裝筆記(2017.11 更新)

最近工作上開發 web ,套版需要一直調頁面,一直重新 reload ,久了真得很煩。 感謝 Terry 推薦使用 livereload ,再裝 chrome 插件,裝完後果然自動更新了,真方便,省了不少時間。 LiveReload 提供了監視檔案變動,並通知 browser reload 的功能。 安裝方式 (Mac) LiveReload 官網 http://livereload.com/extensions/ LiveReload 瀏覽器 extensions http://livereload.com/extensions/ homebrew 方式安裝 $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null $ brew cask install livereload 參考連結 http://macappstore.org/livereload/ 我自己是用 npm 裝來用 $ npm -g livereload 裝好後,指定要監視的目錄,執行命令 $ livereload ./src 執行後就會看到下列訊息 Starting LiveReload v0.6.3 for /Users/kz/Go_Projects/src/api/src on port 35729. 這樣子每次檔案有 存檔/更新 時,頁面就會自動刷新。

Go language - strings.NewReader

最近在找 test 範例,常看到有的人用 strings.NewReader 有的用 bytes.NewBufferString 看文件說明 https://golang.org/pkg/strings/#NewReader NewReader returns a new Reader reading from s. It is similar to bytes.NewBufferString but more efficient and read-only. 

Linebot 試作

年初在網路上看到 evenlin 大大的 linebot 專案,也跟著仿作一個 參考文章 http://www.evanlin.com/create-your-line-bot-golang/ linebot 名稱:誠實小木偶 Source code@github https://github.com/lin11230/LineBotTemplate.git 實際畫面