lebinh

Joined 16 years ago

Karma
186
Submissions
21
Member since
Jun 28
I build new things and fix broken old things. https://github.com/lebinh

[ my public key: https://keybase.io/lebinh; my proof: https://keybase.io/lebinh/sigs/9B2jNoHnF4zRcb06uYKQe76vBRPTfiCzx4iM3rnVHCQ ]

View on Hacker News

Recent submissions

Comment · 9 years ago
To me, that's mostly because the things we need to monitor are scattered around our planet.
Comment · 9 years ago
Just want to point out that Cloudflare doesn't charge for bandwidth, so egress from GCP to Cloudflare is a good way to cut the bandwidth cost.
Comment · 9 years ago
I wrote something out of our need for better monitoring/metrics for Nginx here: https://luameter.com/ And quite a few people are using it for per-vhost metrics use case just like you said. Also if you prefer something simpler and open source I also wrote this https://github.com/lebinh/ngxtop
Comment · 10 years ago
Comment · 11 years ago
Comment · 11 years ago
Measure and profile the code will always be the best thing to do but for simple 20% effort tips I think it would be:

* Don't write your own data structure, stick to the standard library or, in some rare cases, popular and well-known 3-rd party lib.

* Always prefer a Hash or a Set over anything else.

* Beware of any nested loops.

* Have some local / external caches and try memoization.

* Try parallelizing or better, non-blocking wait for all I/O operations.

Comment · 11 years ago
Comment · 12 years ago
Comment · 12 years ago
Had awesome experience with Codementor (https://www.codementor.io/) recently, highly recommended for anyone looking for help or helping others.
Comment · 12 years ago
Unfortunately most of the servers I'm working with are still on python2 by default. The latest Ubuntu LTS, 12.04, only has python2 by default so python2 is still my priority. But in this case, a port should be trivia so I'll look into python3 as soon as possible.

Yes, ncurses would be much better but I haven't had time for it yet. Clearing screen is simple enough and work pretty well for me so far so here we are :)

Comment · 12 years ago
Thanks, I'll definitely add that, maybe put this on pypi asap. For now you can clone the repo and then run

pip install -r requirements.txt

to install required dependencies.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton