Blog

Use Google Translate with Google Sheet - 在Google Sheet 上使用Google Translate

前兩日在 Facebook 上看到一位朋友分享的 Google Document, Google Sheet 的小貼士 我覺得十分有用… 想和大家分享… 原來..我們可以在Google Sheet / Google 試算表 的公式上使用 Google Translate 只需要在 Worksheet 的 Formula 上輪入 …

git Create branch via Command

很多時候都是使用BitBucket / Github 去create 新branch 但是久不久BitBucket 的 選擇 Branch的選項..總是選擇不到 UAT 的 最後選擇最原始既方法… 就是使用 command line 了 解決方法: # 首先 checkout 了你想Create branch from 的 branch && git …

TSQL Variable Scope fun finding

最近同事 發現了一個有趣既 TSQL behaviour 在一般既情況下 Variable 應該是有一個scope 的 如果個Variable 是 Declare 在 If statement 入面 那麼在IF Statement 出面用這個variable 應該會 Throw Error 的.. 以下的TSQL 執行之後 你做會出現什麼結果呢? IF 1 …

Git Your branch have diverged and have 1 and 1 different commits each, respectively

最近同同事一齊用同一個 branch 寫 code 誰不知..呢隻同事..十分喜歡 rebase 或在 push 左既 branch 用 git commit --amend --no-edit 想佢變成一個 commit 之後問題便出現了… 當我嘗試 pull 他的 changes 到我的 local 時 即使我沒有加新的 commit 也出現了以下情況 …

Windows reset subsystem - Ubuntu

最近想嘗試 reset 由頭再安裝 Windows Subsystem 上的 Ubuntu 開頭以入只要 在 Windows Store Uninstall 了便可 但是再次安裝後 之前想 remove 的 application 還是在 Ubuntu 裡面 做了一會 research 之後 終於找到解決方法 我們可以使用 WSL command 來 …

Ubuntu install WPScan

之前介紹過用如何用 Docker 來執行 WPScan 來檢查 Wordpress 有沒有安全問題 最近開始使用 Windows Subsystem 發現原來做 Windows Subsystem 上安裝使用 Ubuntu 也十分方便 我們可以用 subsystem 上的 Ubuntu 來安裝 linux 可以安裝的 software 所以安裝 和執行 …

JS format JSON

如何用 Javascript format JSON 解決方法: 我們可以使用JSON.stringify 來 format e.g. var c = {a : "test", b:{ data: "asdada"}} JSON.stringify(c, null, 4) "{ "a": "test", "b": { "data": "asdada" } …

Useful Heroku command

最近又多用了 Heroku 無左 Microsoft Azure 既 subscription 又怕佢 charge 貴 用 free tier 時發現好似好多野都要收錢咁 剛剛 deploy 了一個 NodeJS project 時 Load 唔起.. 又唔知可以點睇 log. 由於同一隻 App 都是放在 githu 月 Login heroku …

XSD restriction for either specific string or number (mixture type)

如果在XSD restriction 上 容許 mix restriction (mix data type) 呢? 解決方法: 我們可以建立一個simpleType 之後在simpleType 入面使用 union 再把多個simpleType union 在一起 e.g. <?xml version="1.0" encoding="UTF-8"?> …

Visual Studio Useful Shortcut

最近有一個 task 係要做一些 code clean up… 發現有很多重覆既動作.. 係時候用下腦記下 D Visual Studio Shortcut… 因為用 mouse 真係有 D 慢.. 用 shortcut key 有時真係方便好多 Remove and Sort Using Ctrl + R Ctrl + G