Category: Computer Science

  • LRU Caches

    Python There’s many possible implementations for LRU Caches in Python, but probably one of the shortest implementation is through OrderedDict (python >= 3.1). For python >= 3.7, any dict is ordered, but the API does not allow popping items from the start. C++ The C++ standard library provides a nice abstraction for linked lists, which…

  • Optimizing Hosting Costs: Serving Nextcloud and WordPress Simultaneously on AWS

    Due to AWS’s increasing costs of acquiring IPv4 addresses, I thought I could cut down hosting costs by half by hosting this blog and my personal Nextcloud instance on a single AWS Lightsail instance. In this post, I will outline how to make use of the Apache server’s VirtualHost option to serve two websites at…

  • Dissecting a USB Virus

    One day last month, after plugging in one of my USB drives into a school computer, all of the files and folders in the drive were converted to .lnk files. Instinct told me something shady was going on. One month later, I decided to look into the problem. After scanning the drive with my antivirus,…