Author: abhijit

ruby strftime options

Every time I need to format ruby’s strftime options, I need to search for it on the internet. Putting them down here so that I don’t have to do that again!

Date Formatting 1

%YYear with century (e.g. 2015, 1995, etc)
%mMonth of the year, zero-padded (01..12)
%BThe full month name (e.g. January)
%bThe abbreviated month name (e.g. Jan)
%dDay of the month, zero-padded (01..31)
%jDay of the year (001..366)

Flags

Don’t pad a numerical output
_Use spaced for padding
0Use zeros for padding
^Upcase the result string
#Change case
:Use colons for %z
Continue reading

incomplete list of linux mail commands

As mentioned in the previous post, if you need to run cron jobs in linux, knowing how to debug them via mail is really important.

By the way, mail is the older program, the link above is to the man page of mailx which is the newer program created relatively recently, in 1986!

Navigating through messages in the mailbox is quite a challenge as I found.

So I decided to create a list of the commands which I used most frequently and found useful.

Continue reading

setting up Kanboard on Ubuntu with Caddy V2

Kanboard is wonderfully simple project and task management application.

The board view gives a nice Trello like interface, where cards can be dragged & dropped across columns.

A really nice and clean user and role management system.

It has a bunch of plugins, like OAuth2, so that third party authentication systems can be used.

And again, like other software that I like, it uses SQLite out of the box which makes moving the entire application around trivial.

Additionally, I’ve started using Caddy V2 which provides LetsEncrypt SSL certificates out of the box and renews them automatically.

Continue reading

hack the dinosaur game in Google Chrome

In Chrome, if the internet goes off for whatever reason, we get this cute dinosaur game where the dino needs to jump over cacti and pterodactyls.

There aren’t any lives. So, every time you hit an obstruction you end up starting from 0 again.

Which is a bit of a pain.

So, I saw this hack which makes you go through any obstructions without dying.

Continue reading

fossil core dumped error – home directory must be writable

I got this fossil error during the latest server setup on Ubuntu. Earlier, it was just the question of adding fossil to the path.

But for some weird reason, I got this error this time –

home directory "" must be writeable
Aborted (core dumped)

After trying to search for the error, I finally got a clue at this fossil check-in, which shows the check for write access to the home directory to create a .fossil file.

Checking all accesses, everything seemed absolutely correct, so the only thing left to do was to create the file manually –

touch ~/.fossil

This solved the problem correctly.

ruby – update default bundler

Whenever I get this error, I have to again do a google search. So, this post is for me not to do that again!

Could not find 'bundler' (2.1.4) required by your .Gemfile.lock.
 (Gem::GemNotFoundException)
To update to the latest version installed on your system,
run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.1.4`

Unfortunately, the suggestions don’t quite work.

The correct way to fix this is to run these three commands:

gem install --default bundler
gem update --system
bundler update --bundler

Courtesy of StackOverflow. (The correct answer on StackOverflow didn’t quite work either!)

Use Wake-On-LAN to wake up another computer when your PC resumes

Starting up another computer on a network itself is such a fascinating idea! For me, it literally feels like magic!

There are so many things involved. The computer which needs to be started (or woken up) has to have the capability, both at the hardware and the software level.

Also the computer doing the waking needs to send a magic packet!

When I initially heard this, I honestly thought this was a joke of some kind. A magic packet? Really?

Continue reading

Copyright © 2024 the möbius trip

Theme by Anders NorenUp ↑