Terminal : How to copy files showing progress

While copying large amounts of files (lots of photos) I used to use Finder in the macOS. Good ol’ drag-n-drop

Usually it is reliable, but lately I’m facing some problems when copying files to external disk.

Finder itself would become unresponsive.

So I decided to use terminal instead.

It worked (kinda) but it took 51 minutes to finish the copy (There were a lot of files)

and as you know traditionally cp does not show progress.

Continue Reading »

macOS : Possible workaround for `Disk Not Ejected` error

See this thread titled :

Disk Not Ejected Properly – AGAIN AGAIN AGAIN AND AGAIN…

I have started seeing this problem a LOT

TL;DR: Something breaks when macOS goes to sleep

Solution : Do not allow macOS to sleep when using external disk.

I have had to resort to using an application called Amphetamine (earlier Caffeine) and set the ‘Drive Alive’ mode to prevent sleep. All the problems went away. It has nothing to do with ‘frayed cables’ or ‘drives going bad’.

Continue Reading »

MacOS : How to Clean up the disk

In my plan to shift to Linux, I considered dual booting.

Turns out I may not have enough disk space.

I have reached at about 12 15GB free space. At first I thought, if live session can fit into 4GB, then 12 15GB should be enough, but looks like that may not be the case. 1

So I’m shelving the plan to dual boot.

I’ll go with full disk install. That way linux gets entire 128GB SSD ๐Ÿ‘

Continue Reading »

Vivaldi: How to save all open tabs (and Why ?)

For a long time, I’m considering switching to Linux full time since my existing machine does not get OS updates from apple. 1

In preparation for this “move”, I check whether all the software is available on Linux.

Vivaldi browser in on that list (available on Linux โœ…).

What about my already opened tabs ? Every few days I close the temporary/ unwanted tabs. 2 but I do want others on Linux. Hence the search whether it is possible. 3

Continue Reading »

What does demunge mean in clojure repl ?

I started learning clojure yesterday.

Initial useful (for me) command in clojure REPL : dir 1

As per the example given in the documentation, (dir clojure.repl) produced list of commands (?) - one of which is demunge

I had no idea about it, and so I tried dir(demunge) and it returned nil ๐Ÿ˜†

I could not find it in the documentation, so I asked ChatGPT about it, and it explained the following: 2

Since clojure runs on top of JVM, compiler converts the code into java bytecode.

Continue Reading »

How to use Google Keep for Quick Capture with Obsidian

Problem

While I use 1 Obsidian to capture everything while I’m at the desktop, it gets tricky when I’m away from the Desktop. Especially during my morning walk, I listen to Audiobook, and want to capture either a quote or some of my own related thoughts. 2

Solution

Today, I came across a YouTube Video 3 which addresses this issue.

Zsolt goes on to explain how see sought suggestions on Twitter 4

Important components of his solution are to use Google Keep on mobile (Voice assistant if need be)

Continue Reading »

When Firefox does not open

Today, after applying latest update of macOS Monterey, I restarted my laptop.

But Firefox won’t start ๐Ÿ˜ข

No error, no nothing, no window either.

At first, I uninstalled existing version, downloaded a fresh one from internet (using Vivaldi). I assumed that maybe my OS update broke something, and reinstalling might help.

It didn’t.

Then, I started Firefox from the terminal hoping to see error, if any 1.

Didn’t help.

Next, I decided to remove the cache. 2

Continue Reading »

How to pretty-print in Rust

Today, I accidentally found out that instead of using {:?} to debug print, if one just adds an extra # like {:#?} the variable is pretty printed.

This makes sense for struct rather than simple data types like numbers or strings.

The interesting part (for me at least) is how I “discovered” it ๐Ÿ˜„

When I was printing a struct (for debugging ๐Ÿ™ˆ) VS Code (I think rust analyzer plugin) showed a popup how the struct does not implement Display 1

Continue Reading »

How to specify the size for the embeded image in Obsidian

TL;DR: When inserting a link (especially of the image) one can add pipe followed by size. This size is used for displaying embedded image inside the note.

For example, I have a markdown and excalidraw mixed note named Dashboard

It references itself (for the excalidraw image on the back of the note) like ![[Dashboard]] 1

This results into an image that just shows small preview that is not useful, especially if image is wide (and/or tall).

Continue Reading »

โ†’ macOS : Whichspace โˆž

I have been using macOS for almost 9 years, and never used the workspaces feature (Not sure when it was introduced)

But after looking at Omakub I started using this feature.

Essentially, I divided the apps as follows. (Or at least that is what I wanted ๐Ÿ˜„) Each app (window) on its own workspace.

  • Alacritty
  • Firefox
  • Vivaldi
  • Whatsapp and Telegram (Social apps) together on separate workspace.

But somehow, some of the browser windows (I think new ones, after I moved existing windows to different workspace) moved to different ones.

Continue Reading »