Author: Abijeet Patro

Must use WordPress plugins for a technical blog

When I took a Droplet from Digital Ocean to host my server, I decided to give Ghost a shot. Using Ghost was a unique experience. It was minimalist and the editing experience was great. Unfortunately a lot of things like analytics, image compression, comments, advanced SEO, and code syntax highlighting were absent or took time to setup. The core team implement things fast and have a very aggressive release cycle, but theme developers are not able to keep pace with the changes and new features available. In addition, the default theme that comes with Ghost is not very apt for a technical blog.

I have hence decided to shift back to WordPress in order to utilize the large number of plugins and themes. This blog contains a list of plugins that I have installed and consider as must use WordPress plugins for a technical blog.

Continue reading

Ownership and Borrowing in Rust

I’ve been having a lot of fun learning Rust. I’ve been going through the second version of the Rust book and have covered uptil chapter 6 – Enums and Pattern Matching.

One of the unique things about Rust is the Ownership system. I had some doubts understanding this. Searching on Google lead me to this little website – http://intorust.com/ that has some really cool videos explaining – ownership and borrowing.

The author, Nicholas D. Matsakis, has a lot of other interesting work that you can read at http://smallcultfollowing.com/babysteps/

On another note, I’ve been pushing my Rust code to the repository here. I’ll be happy to receive any feedback.

Disinfecting a Windows machine

So last weekend my sister came to me with a slow performing Windows 8.1 Acer laptop. She wanted me to format it and install a new copy of Windows 8.1.

I’ve been using Debian for the last 3 years. Previously I was dual booting between Windows and Debian in-order to play DOTA 2 with my friends, but since Valve released DOTA 2 on Linux, I’ve had little reason to open my Windows installation. As you’d expect I didn’t have a Windows 8.1 setup disc or ISO lying around. I debated whether to shift her to a clean KDE based Debian machine and she agreed as long as her desktop looked nice but I changed my mind when I saw the software she was using –

  1. Cyberlink PowerDirector Pro
  2. Cyberlink PhotoDirector
  3. Bunch of free games

I’m sure I’d be able to find alternatives for the above, but it’d be too much of a learning curve for her, plus setting up a KDE machine from scratch would take some time.

I decided to investigate the reason for slowness, and possibly fix the problem itself. Upon further discussion with her, I found out that the laptop was not only slow, but was infected with some sort of a malware. She was getting permission errors while opening certain folders, and a lot of the folders were hidden.

Continue reading

Renewing Let’s Encrypt certificate

Have the following command setup in my crontab to renew the certificate for this blog, and for the main website – thecurlybraces.com

30 3 1 */2 *  /opt/letsencrypt/certbot-auto renew --pre-hook "" --post-hook "service nginx restart"

This causes the command to run, at 03:30 on day-of-month 1 in every 2nd month.

Output

-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/thecurlybraces.com.conf
-------------------------------------------------------------------------------
Cert is due for renewal, auto-renewing...
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for thecurlybraces.com
http-01 challenge for blog.thecurlybraces.com
Waiting for verification...
Cleaning up challenges

-------------------------------------------------------------------------------
new certificate deployed without reload, fullchain is
/etc/letsencrypt/live/thecurlybraces.com/fullchain.pem
-------------------------------------------------------------------------------

Congratulations, all renewals succeeded. The following certs have been renewed:
  /etc/letsencrypt/live/thecurlybraces.com/fullchain.pem (success)
Running post-hook command: service nginx restart

Incase you want to add more domains to an existing certificate, use the following command –

sudo /opt/letsencrypt/certbot-auto --expand -d blog.thecurlybraces.com -d thecurlybraces.com -d bitsnpieces.thecurlybraces.com --pre-hook "" --post-hook "service nginx restart"

This assumes that you have only a single certificate. If you’ve more, you’ll have to use --cert-name. Read more here.

Just putting this here for reference, and with the hope that it might be useful for someone else.

Setting up a blog using Ghost on Debian

My web hosting’s annual payment date was drawing close, and instead of renewing it, I decided I’d rent a server on Digital Ocean for 10$ a month. It turns out to be a lot more expensive but gives me the option to use the server for something other than just blogging and running PHP application.

After shifting to this new server, the first thing to do was to migrate my blog here. WordPress is an amazing platform, but over the years it has evolved to something a lot more than just a blogging tool. Besides the new kid on the block – Ghost, was creating a lot of buzz for its simplicity. I wanted to give it a try.

I setup my Digital Ocean server with Debian (Jessie 8.2). Node.js is required to run Ghost. Since I wanted to use this server for multiple applications, I decided I’d put nginx as a front facing proxy/compression server.

This blog item is a guide for setting up Ghost on a server running Debian. Let’s start,

Continue reading