Flexbox Defense

This is a fun way to learn css flexbox in a tower-defense game.

http://www.flexboxdefense.com/

Shortcut to insert new rows in Google Spreadsheets

First select a whole row, then do Opt Cmd =. That’s option key, command key, and the equal sign key.

I am using Chrome on osx.

There are more shortcuts from this post: https://webapps.stackexchange.com/questions/44607/shortcut-to-insert-new-row-in-google-spreadsheets

Photopea

Photoshop in a web browser, pretty amazing!

https://www.photopea.com/

brew update is stuck

There is no output, no errors, no nothing. It just sits there.

Maybe related to this, who knows? https://github.com/Homebrew/brew/issues/3285

So I reinstalled brew.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

But then the install process is stuck at this line

==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools

After some googling, apparently it’s caused by some combination of osx and xcode, see here: https://github.com/nodejs/node-gyp/issues/569. So I ran the following to fix the issue. 

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

But then after Ctrl-C and reinstall brew, I got stuck at another line, seems like it did a git reset HEAD but stuck right after.

I tried a few other things but nothing could pass that point. Then just random guessing I checked my Software Update, and saw a 5Gb osx update sitting there waiting, I was like, why not?

So update osx, reboot, then magically brew starts working. =)

Get real page source

Nowadays with all these javascript frameworks if you just do a view page source, you will only get the skeleton app div with a bunch of script tags. To see the expanded real page source, type in the following in the web console.

copy(document.querySelector('html').outerHTML)

That will copy the computed dom to your clipboard, then you just need to paste it to your text editor. You will see all the other dom nodes which the js files added to the app div.

Ref: https://stackoverflow.com/questions/6364138/how-to-get-fully-computed-html-instead-of-source-html

Watch these videos before looking for a new car

Kevin Hunter, who worked at car dealerships before, gives the inside scoop of what’s happening at the car dealerships. I have experienced a few things he talked about in the past. These videos are definitely worth watching before heading to the car dealerships.

Personal information price tag

Here is a nice blog post on how much things related to personal information (e.g. credit cards, driver license, etc) are sold on the dark web.

https://www.privacyaffairs.com/dark-web-price-index-2020/

Financial Statements

Here is a nice tutorial on financial statements.

https://www.causal.app/blog/whats-a-financial-statement

Format a USB stick

There are times Disk Utility cannot help you. Then you know it is time to turn to the command line.

sudo diskutil list
sudo diskutil eraseDisk FAT32 NEW_DISK_NAME /dev/disk3

Make sure /dev/disk3 is indeed the usb drive, go through the drive list from the result of the first command to make sure.

FAT32 is the file system you want to use on the usb drive. And NEW_DISK_NAME is the usb stick volume name. If you pick say myDrive, and you get the error myDrive does not appear to be a valid volume name for its file system, simply use uppercase characters, e.g. MYDRIVE, that will help you move forward. You can rename it later after formatting it.

I converted my unreadable USB drive from

/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *7.8 GB     disk3
   1:        Apple_partition_map                         4.1 KB     disk3s1
   2:                  Apple_HFS                         2.4 MB     disk3s2

to

/dev/disk3 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *7.8 GB     disk3
   1:                        EFI EFI                     209.7 MB   disk3s1
   2:       Microsoft Basic Data NEW_DISK                7.6 GB     disk3s2

Ref:

https://www.easeus.com/mac-file-recovery/format-usb-flash-drive-to-fat32-on-mac.html

How to Erase a Disk from Command Line in Mac OS X

https://superuser.com/questions/838786/diskutil-rename-error-does-not-appear-to-be-a-valid-volume-name-for-its-file-s

Async/await

Nice tutorials

https://javascript.info/async-await

https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Async_await