Category: SoftwareEngineering

  • Migrate WordPress blog to another Lightsail instance

    A few notes on how I semi-automated the migration of this blog to another Lightsail instance. Setup This guide assumes a couple of things: To use the following scripts, you’ll need to install the AWS CLI and configure credentials. Back up A rudimentary way of backing up the database and the WordPress files in the…

  • Truncate DDB table

    One of the features that I miss from most RDBMS is the ability to easily delete all rows, either via DELETE * FROM MyTable or using TRUNCATE TABLE MyTable. Unfortunately, DynamoDB does not have such a feature, you have to either, delete your table or remove all items one at a time. Sometimes, however, deleting…

  • Git notes

    Git is such an important tool that it deserves its own notes page. How to specify a private SSH key You’ll need this if you have more than one GitHub (or similar service) accounts. It looks like you can’t use the same SSH key in different accounts? Sources

  • LeetCode helper (Tampermonkey)

    A tiny script that facilitates interactions with the LeetCode website. It adds one button on the top-left to easily copy the problem ID and problem URL. Because copying the ID from the URL bar is a pain in the neck.

  • Merriam-Webster helper (Tampermonkey)

    A tiny script that makes merriam-webster.com/ work nicely with Vimium. Features:

  • Back-of-the-envelope estimations

    Materials Numbers you should know

  • Delete multiple DDB tables

    WARNING: Use at your own peril, this will delete DDB tables w/o asking for confirmation. I found myself deleting tables manually from the DynamoDB UI, and it started to get tedious, here a small working program to delete tables in Java. Full code: https://github.com/rendon-aws/ddb-examples Thanks for reading!

  • Web development notes

    Tools/services REST vs gRPC Resources HTML CSS JavaScript How-to How to call REST APIs GET calls POST calls Rails Rails status codes The :status Option Ensure required environment variables are set when booting up Rails Create an initializer under config/initializers like so: Source: https://boringrails.com/tips/ensure-rails-env-vars Run rails over SSL locally SSL/TLS: Convert .pem files to .crt…

  • Segment Tree

    Theory Implementation With lazy propagation Practice problems

  • Bellman-Ford algorithm for shortest paths

    Theory Implementation Practice problems