RSSAmplifier

Blog

Alex Le

alexle.netRSS feed ↗10 posts

Latest posts

tmux cheatsheet

Tmux Cheatsheet Session tmux ls == list detached session tmux attach -t 0 == attach to session Window ctrl b + % == split left ctrl b + ' == split top/bottom ctrl b + Left == switch left ctrl b + Right == switch right ctrl b + d == detach current session New [ ]

Serving https for localhost

For certain time that you need to run your local development server in https (e.g. Oauth callback to local development server), you can run the server in SSL mode using mkcert $ brew install mkcert $ mkcert localhost 127.0.0.1 ::1 Created a new local CA 💥 Note: the local CA is not installed in the [ ]

Sovling mysterious Airflow Workers getting stuck in AWS

Recently I ran into a very nasty issue with Airflow s workers getting stuck in AWS. The workers would process a job and then randomly got stuck. For me, the worker kept getting stuck when it connected to Box API and Salesforce. This issue took a while to find the root cause and finally a fix. [ ]

Python: show a nicer stacktrace from your exception

Normally when there s an exception in your Python code, you ll be pleasantly shown a very detailed and long stacktrace full of information, sometimes useful or sometimes not. This stacktrace can be very noisy and it will take a while to look through all the code to pinpoint the issue. It s a lot more useful to [ ]

Rename folder in Google Cloud Storage (GCS)

To rename a folder in Google Cloud Storage (GCS), say, gs://your-bucket/folderA to gs://your-bucket/folderB, you can use the gsutil mv command. However, the tricky part is that you have to go inside folderA to list all sub-folders and objects, otherwise you ll ended up with an incorrect move result. Here s the snippet to rename the files correctly. [ ]

Bash-Fu

Perform actions on files containing a certain string A quick snippet to find from the local files that contain a certain string and move them to another folder using grep and xargs: grep -Rl . -e 'mystring' xargs -0 -d \n -I {} mv {} destination/path Explanations: for grep, -R is for recursive, -l [ ]

Apache Airflow Powertips

Airflow is a great open-source workflow management platform developed by AirBnB. At my current company, we adopted it as a major and critical piece of our daily operation. Compared to our previous home-grown batch processing jobs stitched together with Ruby, Sidekiq, Cronjob, Airflow provides a much more superior way to orchestrate and process our data [ ]

Quickly open node package in your $EDITOR

Sometimes I need to open a package under node_modules and it s not very convenient yet, I d have to remember to type in subl node_modules/ name>. With Ruby s Bundler, it s a simple bundle open gem_name and the gem will be opened in the default $EDITOR. However, for node, it s not quite as nice. A simple solution is [ ]

Taco Bell Programming

I just read a really interesting article that 100% vibes with me titled Taco Bell Programming. . Taco Bell has just roughly 8 ingredients for and yet they pulled in 1.9B. Coding should be kept to a minimal. It s easy to over-design a system and make it way more complex than what it is. Functionality is [ ]

Free Alternative to ngrok with Permanent Subdomain using Nginx, SSL, and reverse SSH Using Your Own Server

I enjoy using ngrok quite a bit to expose my laptop temporarily to the world for testing or demoing. However, every time I have to restart ngrok, the subdomain changes unless I pay $60/year for a better account. I m not against paying, in fact, I support paying for software that I use, but being a [ ]