โ†’ Omakub โˆž

Yesterday, I came across this new script released by Basecamp.

The one-line pitch is:

Turn a fresh Ubuntu installation into a fully-configured, beautiful, and modern web development system by running a single command.

This was started by DHH, but now has a lot of contributors.

Since I’m not on Ubuntu, I can’t directly use it. But I’m tempted to set up Ubuntu on a spare (?) machine just to try this out.

Continue Reading »

fill-paragraph in Helix

Emacs 1 has this command fill-paragraph (Usually M-q) which will auto format long uneven lines to make them look even by adding a hard wrap.

But I use helix for writing these blog entries. That is how I discovered reflow command in Helix.

It is simple really

Select the blocks of text you want to format (by typing x and repeating for as many line as you have). Then :reflow. That’s it!

Continue Reading »

macOS: How to render thin(ner) strokes in Alacritty

After going through omakub 1 and its source, I wanted to recreate it on macOS as much as possible.

The first thing was to use Alacritty.

I had tried it in the past, but moved to Wezterm.

The reason I stopped was because there was no support for panes or tabs (which is by design) But now that I’m anyway using Zellij for that, I decided to give Alacritty another chance.

But default rendering looks fat (or bold) which I didn’t like.

Continue Reading »

Django: Create new project in an existing folder

Default command for creating a new project is :

django-admin startproject my_new_project

Django will then create a folder called my_new_project (if it does not exist)

But if folder my_new_project exists (even if empty) we get error like :

CommandError: '/path/to/my_new_project' already exists

The way around is to specify a folder name after the project name like

django-admin startproject my_new_project existing_folder

See the documentation for details.

UV: Superfast pip replacement written in Rust

It is (almost) drop-in replacement for pip. We just need to invoke it as uv pip instead of pip

How to install ?

  • pipx install uv : This makes it available everywhere.
  • Other alternatives are curl (recommended) and brew (on macOS)

It is superfast

I tried installing Django

$ uv pip install Django
Resolved 3 packages in 138ms
Downloaded 3 packages in 2.53s
Installed 3 packages in 228ms
 + asgiref==3.8.1
 + django==5.0.6
 + sqlparse==0.5.0

This took 3s (As opposed to 33s taken by pip)

Continue Reading »

Rust: How non-primitive types are available in the default scope

In rust, str is a primitive type, but many non-primitive types are also in scope by default.

e.g. We do not need to add use statement to use Vec - which is NOT a primitive type.

It comes from std::vec

So Vec::new() is really std::vec::Vec::new()

Vec::new() works because Rust inserts this at the beginning of every module:

use std::prelude::v1::*;

This makes Vec (and String, Option and Result) available by default.

Continue Reading »

How Zellij saved me

OK, title is a bit of clickbait. It saved me some inconvinence ๐Ÿ˜‰

Yesterday, Wezterm crashed.

At first, I was worried that all my “work” is lost (few blog posts were in-progress and open in helix)

But I had forgotten that I always start zellij these days.

So all my “work” was indeed there.

All I had to do was zellij ls followed by zellij a my_session1 (and my_session2 and so on)

Continue Reading »

Importance of Making Things

On the knowledge project podcast, Shane parrish interviewed Kevin Kelly

The link above has good high level overview with timestamps. Definitely check it out.

One thing that is not covered in the timestamps (hence I can’t link to the exact conversation) is about Importance of making things 1

Kevin says something to the effect of, don’t stop making things (that you care about) just because they are not the greatest or the best. Your “thing” may have influence (or use) for someone in the future in ways you can’t imagine.

Continue Reading »

Homework for Life

In One percent better podcast 1, Joe interviews Matthew Dicks

Matthew explains the Homework for Life 2 as (paraphrased)

At the end of each day, write down important “stories” (not memories) of the day. Else life passes by, and we don’t remember what you did 12 years from today. (Cause all days look the same in past)

He is a teacher. He asks his students to narrate stories (on a Monday, start of the school) He mentions that 10-year olds can come up with excellent stories. One example he mentions is

Continue Reading »

Vivaldi Browser

I switched to 1 Vivaldi browser after reading this post by Mike Kennedy

To be fair, I had installed and tried Vivaldi a long time ago. But I think things got better this time around.

I seem to have stuck with it for long time.

One benefit of chromium based browsers (like Vivaldi) is that user has access to vast amount of extensions from Chrome Web store. 2

Just today, I explored two other “features” which I’m not sure how I feel about.

Continue Reading »