Restart

about 1 month ago 2 comments

This site is now powered by Ruby on Rails. Yep, completely rewrote it in Ruby. I've ported all features and posts from the old site over and everything's working flawlessly now. In fact, I've added quite a lot new features, such as comments! Yes, you can now comment on every post!

Why move to Rails?

The old code base just got pretty messy and I've worked a lot with Ruby lately so it just looked like a nice opportunity. What gave it the final kick was that I accidentally made a mistake on the site's database which deleted quite some data.

Also, I wanted to get better at Rails and Ruby too.

I've heard from people that Rails ain't a good fit for blogs, but I personally don't think so. Rails is an amazing framework which can totally be used to write a blogging engine.

Goals

  • Have similar URLs
    • At the beginning, I wanted to keep the exact same URLs, however, I quickly dropped that idea in favor of Rails' routing best practices. All old URLs are redirected, though.
  • Fix bugs from the previous version of the site
  • Add comments
  • Use existing Markdown posts
    • I wanted to be able to just "import" my previous posts and keep writing in that format, no changes.
  • Stay close to Rails' best practices
    • I wanted to create a "true" Rails site, utilizing as many of its features as possible.
  • Make the site even faster
    • The previous site wasn't slow by any means, but I wanted to make it a little faster, which I really did!
  • Use the same design
  • Add a JSON API for (almost) all pages
    • Try appending .json to the current URL! API docs will come soon (edit: they're here)!
  • Write much cleaner code

Open Source

I think about open source'ing this site's source code, but I'm not quite sure about that. We'll see.

What happened to the previous posts?

The previous posts are all imported, however, most of them are archived. This means that they don't show up on the site or in feeds, but are still there if you know the URL. I left most macOS-related posts up as they can still be quite useful. The other posts were mostly obsolete or just of low quality.

What comes next?

I'm not quite sure. I want to continue writing on this site, that's for sure, at least.

I want to write better, longer, more detailed posts in the future. Most of my previous posts were just really short without much content.

Time Machine backups on regular SMB drive

8 months ago 0 comments

I just set up my Mac to save Time Machine backups to a regular SMB share. Doing this is actually quite easy:

Step 1: Create a .sparsebundle

Open Disk Utility and choose File => New Image => Blank Image.

Give the image a name and size (check the Time Machine settings first to see how large your backups will be).

IMPORTANT:

  • Set Format to Mac OS Extended (Journaled)
  • Set Encryption to 128-bit AES encryption
  • Set Partitions to Single partition - Apple Partition Map
  • Set Image Format to sparse bundle disk image

Now click Create.

Step 2: Copy the .sparsebundle to your server

Unmount the .sparsebundle by clicking the eject icon next to the image's name in the Finder sidebar. Now copy the .sparsebundle onto your server. You can now delete the original version from your Mac, just make sure that the copy is on your server.

Step 3: Configure Time Machine

Open up a new Terminal window and type

sudo tmutil setdestination "/Volumes/NameOfYourImage"

(replace NameOfYourImage with the name of your .sparsebundle image)


Congratulations, you're done! Now you can start a new backup in the Time Machine settings.

Clean macOS dot underscore files

9 months ago 0 comments

If your directories are full of files like ._filename, simply run dot_clean -n <DIRECTORY> to merge them with their corresponding native files.

The option -n means that every ._ file which can't be merged will be deleted. For more information on that, run man dot_clean (web version).

Restarting the audio process in macOS

10 months ago 0 comments

Just in case your Mac refuses to play sounds, try killing CoreAudio, it will restart shortly after:

sudo kill -9 `ps ax|grep 'coreaudio[a-z]' | awk '{print $1}'`

Works perfectly fine to fix sound output on my Mac on 10.14!

Source

Get rid of the macOS Catalina update badge

about 1 year ago 0 comments

This happened lately. I disabled searching for updates on my Mac, because I want to stay on 10.14, but accidentally opened the update preference pane, which then started to search for an update.

Since then, the settings icon in the dock had this red badge indicating, that there's an update available.

That's really distracting, so I tried out many commands to remove it, but none of them worked. One was working in 10.13 and lower only, another one required you to do it before the update was found, ...

But I ended up with this command, which actually worked: defaults write com.apple.systempreferences AttentionPrefBundleIDs 0 && killall Dock (Source).