最近因為耳筒 send 左去維修… 會用SF Express 寄返 比我… 但係每次 Google SF Express Tracking 之後又要人手打果個 Tracking no.. 感覺有D 煩… 所以今日想同大家分享一個 direct link… 只要replace 左 {TrackingId} 便可.. https://www.sf-international.com/us/en/dynamic_function/waybill/#search/bill-number/{TrackingId} hope you find it useful
今日想同大家分享一個 PostgresSQL Database maintenance script 用來 reclaim 返 D space 解決方法: VACUUM (FULL, FREEZE, VERBOSE, ANALYZE, SKIP_LOCKED, INDEX_CLEANUP, TRUNCATE); hope you find it useful
最近XROUND VERSA 無線耳機 多了斷線問題.. 所以便message xround 看看有沒有解決方法… 或是要寄去維修.. 問了恢復原廠設定.. 恢復原廠設定之後很像問題暫時解決了 如果遇到相同問題既朋友可以嘗試以下步驟 下步驟恢復原廠設定: 1.手機清除藍牙裝置後→關閉手機藍牙 2.VERSA依照以下說明恢復原廠設定: ①請先將VERSA手動關機:長按兩耳按鈕約5秒,會聽到"Power off"提示音 ②關機狀態下,同時長按左右耳按鈕約十秒 連續出現五次提示音後,請放開按鈕,耳機會先出現"Power ON"提示音,後出現”TWS connected”之提示音 3. VERSA會接著進入配對模式(LED紅藍閃爍),並出現"Pairing"提示音,即回復原廠設定完成 4.將手機藍牙開啟,並與VERSA配對 ※回復原廠設定期間,請勿將耳機放回充電盒 ※回復原廠設定必須雙耳同時進行 hope you find it useful
我個domain sharechiwai.com 仲有一個月就到期.. 上網𢳂GoDaddy 既discount code 很多時候都是for 新客… 或者是其他服務… 很少 rename domain 會有 promotion… 發現佢地有 Live Chat 這個服務.. 所以便嘗試用 Live Chat 問下… 睇下有無 Promotion Code 可以用黎比我 renew domain 個答案係… Live Chat 既其間… 佢會叫我入 GoDaddy 既 Client Id 同 PIN 去verify 我個account .. 完成後..因為我已經將想renew 既 item 加到 shopping cart 上…
最近又開始用多左docker 到玩唔同既野… 有時候都係用黎試D tools, 都係run 一次build 左個 container 就唔洗再 docker-compose up 今日想同大家分享既係.. 點樣用docker-compose up 去 run 唔係docker-compose.yml 解決方法 我地只要specific 個檔案名便可 e.g. 我個project 有2 個docker file docker-compose.yml docker-compose-sonarqube.yml 我只需要加 -f 這支flag 便可以specific 用 docker compose 執行那一個 docker-compose 檔案 docker-compose -f docker-compose-sonarqube.yml up ## docker-compose -f docker-compose.yml down hope you find it useful
公司個project 開始成形… 係時候要用D tools 去 做多D checking 去 ensure D code quality 係 OK… 朋友介紹可以用 SonarQube run D test 去Scan 下個project 有無 potential issue bugs / vulnerability / code smell 等等 為左唔好係部電腦上 install 太多野.. 所以都用docker 係local 度run SonarQube 當我嘗試 docker-compose 時 出現左以下個 error message
因為唔想係安裝太多不必要既software 係電腦度… 用docker 其實係一個好好既選擇… 唔需要擔心不同既dependency.. 同version 既問題… 今日想同大家分享 怎樣用docker run SonarQube 大家可以到以下GitHub repository copy / fork 個 docker-compose.yml https://github.com/sharechiwai/docker-nginx-multiple-sites/blob/main/sonarqube/docker-compose.yml hope you find it useful
之前 個Website down 之後發現原來係 PostgresSQL connection 爆左.. 所以個server 唔可以再make connection… 想知道個SQL D connection 用左幾多… Stackoverflow 完之後搵到一個 PSQL 既 query, 可以用黎 check 下用緊幾多connection 同仲有幾多connection remain https://dba.stackexchange.com/questions/161760/number-of-active-connections-and-remaining-connections 解決方法: select max_conn,used,res_for_super,max_conn-used-res_for_super res_for_normal from (select count(*) used from pg_stat_activity) t1, (select setting::int res_for_super from pg_settings where name=$$superuser_reserved_connections$$) t2, (select setting::int max_conn from pg_settings where name=$$max_connections$$) t3 hope you find it useful
有時候個SQL script 太大.. 如果用 SQL editor 去 run 個 .sql file 好大機會 會crash 我地可以用 command 來 execute 呢個 .sql 我就用呢個方法去Restore database backup 解決方法: psql -h [`hostname`] -U [`username`] -d [`database_name`] -f [`sql_script.sql`] psql -h localhost -U postgres -d local-db -f dump-local-db-20220701150001.sql hope you find it useful
如果想幫 PostgresSQL 做個database backup 之後係 SQL Editor 上..load 返呢個 SQL backup file 我地可以用 pg_dump 去backup 個 database 用佢個 insert statement option 便可 解決方法: pg_dump --verbose --host=[`hostname`] --port=[`port`] --username=[`username`] --format=p --encoding=UTF-8 --inserts --no-owner --file [`filename`].sql -n "public" [`database_name`] pg_dump --verbose --host=localhost --port=5432 --username=postgres --format=p --encoding=UTF-8 --inserts --no-owner --file dump-local-db-$(date '+%Y%m%d%H%M%S').sql -n "public" local-db hope you find it useful