Published inCuong Huynh·Nov 25, 2020Fixes Vagrant network has broken after MacOS upgrade to Big SurYou will get the error when executing vagrant up: ➜ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'bento/ubuntu-18.04' version '202008.16.0' is up to date... ==> default: Clearing any previously set network interfaces... There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The…Vagrant1 min readVagrant1 min read
Published inCuong Huynh·Nov 5, 2020Firebase functions deploy failed, the default service account does not existI have got this error message when deploying firebase function: HTTP Error: 400, Default service account 'project-name@appspot.gserviceaccount.com' doesn't exist. Please recreate this account (for example by disabling and enabling the Cloud Functions API), or specify a different account. The command used to deploy is: firebase deploy --only functions I have…Firebase Cloud Functions2 min readFirebase Cloud Functions2 min read
Published inCuong Huynh·Apr 23, 2020Login Gmail via Command Line OpenSSLSometimes you need to figure out what's going wrong and where. Make sure OpenSSL installed on your server. Connect openssl s_client -connect smtp.gmail.com:465 You will see certificate info and handshake steps afterward: CONNECTED(00000003) depth=2 OU = GlobalSign Root CA - R2, O = GlobalSign, CN = GlobalSign verify return:1 depth=1 C = US, O…Openssl4 min readOpenssl4 min read
Published inCuong Huynh·Apr 23, 2020Combine Apache’s HTTP authentication with X-Forwarded-For IP whitelisting in a reverse proxy LoadbalancerIf you want to protect a page or an entire website with HTTP authentication, but also want to whitelist a few fixed IPs (for instance: office or VPN IPs), you can combine both authentication mechanisms in Apache 2.4 via .htaccess files. The full example goes like this. Request Deny Require all…Htaccess1 min readHtaccess1 min read
Published inCuong Huynh·Feb 11, 2018Setup Handlebars with SageWhat is Sage? Sage is a WordPress starter theme with a modern development workflow. My Problem I’ve used Handlebars templates in projects, but only simple way — I defined a <script> block in html templates and used in my js code. …Gulp2 min readGulp2 min read