WSL2 Backup to OneDrive Cloud

Posted on Wed 31 January 2024 in windows • Tagged with linux, vm, development

WSL2 provides great disk performance, but it requires storing the files separately in a virtual disk that is not accessible by OneDrive. WSL2 can be backed up with wsl --export Debian to a VHD or TGZ, but that is a complete disk backup of 20gb or more -- not scalable for hourly backups.

With this approach, we use Windows Task Scheduler to trigger robocopy to incrementally sync directories from WSL2 to Onedrive's native FS, so incremental copies are fast ( 1 s per 10k files), and OneDrive sync time remains negligible.

It's also useful for snapshotting subdirectories to TGZ for offline or …

Continue reading

IPV6 Migration Guide for Developers using AWS EC2 -- A Primer

Posted on Sun 19 November 2023 in aws • Tagged with devops, development

With the news that AWS will be now charging about $4 / instance-month for public IPv4 addresses, many developers who procrastinated ipv6 migration are finally updating both ends of their development setup.

It's a great time to migrate, as all the intermediate infrastructure now supports IPV6 readily. Moreover, you'll benefit from permanent , global addresses for your development instances.


  • A single, global, stable address for EC2 instances that never changes. No need for dynamic DNS and other hacks
  • No need to pay for Elastic IP addresses on dev instances
  • Global addressing for mutual duplex services (no more NAT needed)
  • Better flexibility …
Continue reading

BeeLink SER6 MAX Out-of-Box Bloatware / Spyware / Malware Review

Posted on Tue 10 October 2023 in windows • Tagged with windows pc hardware

I recently set up a new SER6 and reviewed bloatware / spyware / malware prior to connecting to the internet. There were quite a few posts asking about spyware, and given it's competitive price point, I was also a bit suspicious. I usually do a malware review before connecting any new device to the internet.

What I reviewed

  • running processes and their signatures
  • startup apps (Task Manager formerly msconfig)
  • Installed Services
  • Windows Features Enabled
  • Partition Table Review (for malware)
  • Local user accounts
  • Confirm installed hardware components and brands met specifications.
  • BIOS & Windows 11 Secure Boot, TPM & Enhanced Hardware Security settings (see Questionable …
Continue reading

Improve WSL Security with Read-Only Filesystem

Posted on Wed 04 October 2023 in linux • Tagged with wsl windows linux

By default, all Windows drives are mounted with read & write access (rw) within WSL . Though this is convenient for beginners, it opens up VM shell attacks on your Windows host files.

Instead, we can disable the auto mount feature using wsl.conf and selectively add read-only drives inside the WSL VM using /etc/fstab


  1. Deactivate "auto mount" in /etc/wsl.conf
  2. Enable fstab using MOUNTfStAB = true in wsl.conf
  3. test config files and mounting work well
  4. reboot the wsl VM to complete the setup

Example WSL Config wsl.conf

Place this inside the /etc/ directory on the WSL VM …

Continue reading

Smokeping On Raspberry Pi Zero

Posted on Wed 18 January 2023 in raspberrypi • Tagged with linux, cli, networking

Smokeping is a self-contained network monitoring app , capable of monitoring using ICMP/Ping, HTTP, DNS -- as well as other signals generated from CLI monitoring tools (e.g. curl, dig, mtr etc). It provides a web-based monitoring UI to chart the probe measurements so no further monitoring apps (like Prometheus) are needed.

Running smokeping on a $5 Raspberry Pi Zero is a fun experiment in lightweight computing . Using Apache Mod FastCGI makes the app usable on the meager hardware.

By the end of the exercise you'll have the smokeping probes running to test network performance and the UX available on your …

Continue reading

Testing Without Excuses

Posted on Sun 29 August 2021 in testing • Tagged with linux, cli

Every app has that last inch (or mile) of code that's not covered by tests. Usually it's an interactive cycle of compile-run-inspect on the command line like

You Test

 curl -X POST

👀 You Expect:


Despite having 3-4 testing frameworks for unit tests, e2e, regression etc-- there's always a gap where you find yourself re-playing commands in the terminal to test.

A common case is 🔥firefighting where ad-hoc tests are needed to validate an emergency config change or deployment.

Not only is this a waste of time, it's error prone and reduces the …

Continue reading

Three Pillars

Posted on Wed 14 July 2021 in leadership • Tagged with management, information

Recently an old friend, with great experience as an IC, PM and EM, called me to ask for some advice. He had been running his business for a while and took up a new role as an engineering manager after some time. "What areas do you focus on as an EM?, particularly when joining a new team".

I divided the conversation into three pillars: strategy & inventory, technical (aka going deep) and career / personal

Any given day, week or month will include some of these. Some periods will emphasize one or the other more heavily.


Strategy is about helping the …

Continue reading

Signal Vs Noise

Posted on Sat 14 November 2020 in productivity • Tagged with management, information

Signal Vs Noise

One responsibility of engineers & especially leads is managing many channels of signals : emails, blog posts (internal and external), tags , push notifications, group chats, alerts from dashboards and more.

These signals tend to scale exponentially to the number of projects & people that you are responsible for.

Quickly you'll need to set up a system to make sure that you are receiving high-signal information and filtering out low-signal noise. How do you do that?

For each channel, it's important to set up and continuously refine filters that matter to you.

Each system typically has filtering that can be configured …

Continue reading

A Timeless Directory Layout for All of your Projects

Posted on Sun 31 May 2020 in linux • Tagged with business

Directory layouts are like log cabins that start from a basic shed, gradually adding a room at a time. When you start out on UNIX, everything gets thrown in your home directory. Over time you start to develop a structure for your sources, binaries, projects, data files (like CSV, images, tar files), config, etc

My layout is called TDL -- because it allows me to juggle open source projects, partnerships and jobs in a consistent structure across machines and time.

│── .cfg          # bare git repo with my dotfiles
│── local         # e.g. make install --prefix=~/local     - lib, bin, man  
│── .trash        # files to …
Continue reading

Snooze to Save Money

Posted on Mon 18 May 2020 in bash • Tagged with aws, bash, beginners

Cloud instances bill by the hour (or the minute) – and right now you're burning money. Use snooze to auto-shutdown your instances in 45 minutes.

Add snooze to your ~/.bashrc

alias snooze='sudo shutdown -c ;  sudo shutdown -h +45 &'

When you want to extend your session, run snooze

Broadcast message from ec2-user@ip-172-31-43-250
    (/dev/pts/1) at 2:50 ...

The system is going down for halt in 45 minutes!

How does this work?

shutdown -c cancels the shutdown, and shutdown -h +45 schedules a shutdown in 45min.

How can we automate this?

Stay tuned !

Continue reading