Category: SoftwareEngineering

  • Design a Rate limiter

    High-level design The concept of a rate limiter is relatively simple: a system between the clients and a service that ensures that clients do not use the service beyond the established limits. Limits could include the number of operations in a given period of time, the amount of data transferred over a period of time,…

  • 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 HttpOnly cookies HttpOnly cookies cannot be read using JavaScript. Source: https://stackoverflow.com/q/8064318/526189 Enable ClipboardItem in Firefox From version 87: this feature is behind the dom.events.asyncClipboard.clipboardItem preference (needs to be set to true). To change preferences in Firefox, visit…

  • Segment Tree

    Theory Implementation With lazy propagation Practice problems