Oculus Quest 2 Review

I was debating between PS5 and Quest 2 (Affiliate link), and yes it is like comparing apples and oranges, but in the end Quest 2 won. I will likely buy PS5 at some point though. But before I buy PS5, I need a new TV with 4K and HDR. It seems pointless to play PS5 on 1080p TV from early 2010s. Quest 2 is not my first experience with Virtual Reality. I tried PSVR about 2-3 years ago but the mess of wires really turned me off with the idea of VR. When I found out that Quest 2 is completely wireless, I got interested in it again. I was not very excited about needing Facebook account to use it though. ...

September 27, 2021 · 3 min · Amer Khalid

Importing plotly failed. Interactive plots will not work.

Fix: pip3 install --upgrade plotly

June 2, 2021 · 1 min · Amer Khalid

Docker in 5 minutes

I have been using Docker and Kubernetes for several years now but never really took any time to really read about it. There were a lot of gaps in my understanding of how Docker works and what really is possible with it. Just recently my employer started to offer a Udemy subscription, so I took the Hands on Docker course. Here are some of the important things I learned in this course. ...

May 17, 2021 · 2 min · Amer Khalid

Json_error_ctrl_char

I was using mcrypt to encrypt json_encoded data. On the other side, mcrypt was able to decrypt data but json_decode was not working. It would throw JSON\_ERROR\_CTRL_CHAR error. However, without mcrypt, json_decode worked flawlessly. After some trial and error, I found that applying trim function after decrypting data would let me use json_decode without any issues.

May 10, 2021 · 1 min · Amer Khalid

Find Large Directories on AIX

I usually run it from under a partition which is running out of space. It can take a while. du -g | sort -n -r

May 9, 2021 · 1 min · Amer Khalid

Error Xcode Select Error Tool Xcodebuild Requires Xcode Active Developer Directory Command Line Tools Instance

Playing with Cordova, I was getting this error when building iOS version: Error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory is a command line tools instance Even full install of Xcode didn’t fix this error. The solution was to run the following command to use full Xcode instead of command line tools version that I had installed earlier: sudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer

May 9, 2021 · 1 min · Amer Khalid

Setup Outgoing Email on Lightsail Ubuntu VPS

I followed instructions here: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-18-04 Everything seemed okay but emails were not getting delivered. Logs showed me that smtp connections were timing out: tail -f /var/log/mail.log May 3 12:28:10 postfix/smtp[3160]: connect to gmail-smtp-in.l.google.com[172.217.197.27]:25: Connection timed out May 3 12:28:10 postfix/smtp[3160]: connect to alt1.gmail-smtp-in.l.google.com[2800:3f0:4003:c00::1a]:25: Network is unreachable May 3 12:28:40 postfix/smtp[3160]: 4984C41A1E: to=<xxxx@gmail.com>, relay=none, delay=3246, delays=3186/0.01/60/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400b:c00::1a]:25: Network is unreachable) However, I could ping any of the above ip addresses just fine. ...

May 9, 2021 · 1 min · Amer Khalid

Files Empty in html form?

Put enctype="multipart/form-data" in your form tag.

May 8, 2021 · 1 min · Amer Khalid

hsts Neterr_cert_common_name_invalid

Without full understanding, I had enabled HSTS on amerkhalid.com with option includeSubDomains. I had a subdomain that was used as “Custom Domain” to SmugMug site. After enabling HSTS, these subdomains started to throw NET::ERR_CERT_COMMON_NAME_INVALID. The fix is of course simple, don’t use includeSubDomains. But that opens up your top level domain to man in the middle attacks. For now, I decided to follow the best practices and leave includeSubDomains enabled. And decided to not use a custom domain for my SmugMug site. ...

May 8, 2021 · 1 min · Amer Khalid

TypeError: require.extensions.hasOwnProperty is not a function

While playing with https://github.com/alexa/interactive-adventure-game-tool, I ran into the following error: > interactive-adventure-game-tool@1.0.0 start /Users/amer/alexa/interactive-adventure-game-tool > node node_modules/gulp/bin/gulp.js /Users/amer/alexa/interactive-adventure-game-tool/node_modules/require-dir/index.js:97 if (!require.extensions.hasOwnProperty(ext)) { ^ TypeError: require.extensions.hasOwnProperty is not a function at requireDir (/Users/amer/alexa/interactive-adventure-game-tool/node_modules/require-dir/index.js:97:37) at Object.<anonymous> (/Users/amer/alexa/interactive-adventure-game-tool/gulpfile.js:1:85) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3) at Module.require (module.js:604:17) at require (internal/module.js:11:18) at Liftoff.handleArguments (/Users/amer/alexa/interactive-adventure-game-tool/node_modules/gulp/bin/gulp.js:116:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! interactive-adventure-game-tool@1.0.0 start: `node node_modules/gulp/bin/gulp.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the interactive-adventure-game-tool@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/amer/.npm/_logs/2018-01-02T05_12_24_832Z-debug.log The solution was to update require-dir to version 0.3.2 in package.json and run npm install again. ...

May 8, 2021 · 1 min · Amer Khalid