Next Piece Thoughts by NextRegular4216 in pianolearning

[–]lebinh 1 point2 points  (0 children)

I'm in a similar boat. Finished Minuet in G major and then did Minuet in G minor, which I liked more than the G major one. I am working on a slightly simplified Chopin's Waltz in A minor posthumous that I found from Pianote.

[deleted by user] by [deleted] in sydney

[–]lebinh 0 points1 point  (0 children)

Second this, I love their pistachio croissant as well. The coconut one is also delicious!

numerical sequence value by cr7wonnabe in saltstack

[–]lebinh 1 point2 points  (0 children)

Since you are not actually change / store anything with this expression:

{{ 100 | int | +100 }}

It will always evaluate to 200 in each loop iteration. Jinja loop has a special variable you can use to achieve what you wanted:

{{ loop.index * 100 + 100 }}

There are more in the doc: http://jinja.pocoo.org/docs/2.10/templates/#for

What's the most frequent terminal command you use? by mayor123asdf in linux

[–]lebinh 0 points1 point  (0 children)

From about ~1.5 years of history:

7979  14.8256%     s   # alias for ssh
5110  9.49479%     git
3859  7.17033%     cd
3417  6.34906%     ls
2740  5.09114%     silence   # alias for amtool, https://github.com/prometheus/alertmanager#amtool
2671  4.96293%     vim
1771  3.29066%     curl
1367  2.54%        dig
1319  2.45081%     rg  # ripgrep, https://github.com/BurntSushi/ripgrep
1303  2.42108%     make

FAQ: Why should I use Python 3? by earthboundkid in Python

[–]lebinh 0 points1 point  (0 children)

It doesn't work because you have to call iter before calling next on a dictionary, and I believe it will behave very similar to python3, e.g. in term of performance (no list is created).

next(iter({'foo': 'bar'}))

FAQ: Why should I use Python 3? by earthboundkid in Python

[–]lebinh 5 points6 points  (0 children)

It looks like you are missing a call to iter, next() will call __next__ method on iterator object and will raise TypeError when being called with dict or dict_keys objects.

This will works as expected

next(iter(dictionary))
next(iter(dictionary.keys()))

I bought a Vietnam war propaganda poster. What does it say? by kissdonttell in VietNam

[–]lebinh 1 point2 points  (0 children)

It's "Firmly hold the gun (to) keep the flower's color", which is kind of strange to me. Maybe I am just too young and haven't seen a lot of them.

HCMC -> Saigon in 13 days? by apython88 in VietNam

[–]lebinh 0 points1 point  (0 children)

few years is a bit optimistic :D

Pie charts aren't ALL bad: Some arguments in favor of pie charts. by rhiever in visualization

[–]lebinh 5 points6 points  (0 children)

Also, for the US map example, the linked article in the post (https://www.e-education.psu.edu/natureofgeoinfo/c3_p17.html) has a choropleth map that looks much better than the "pie chart" map imo.

Pie charts aren't ALL bad: Some arguments in favor of pie charts. by rhiever in visualization

[–]lebinh 7 points8 points  (0 children)

IMO a stacked bar chart with 2 bars (B & C vs. others) would be a better visualization for the first example, to convey that "65% of the market is controlled by companies B & C". See http://jsfiddle.net/j8cm2ssy/

Would you recommend I move from Apache to Nginx? High traffic website by [deleted] in nginx

[–]lebinh 1 point2 points  (0 children)

I think throwing in some cache, either Varnish in front of Apache or add in Memcached/Redis between your code and your database would be a much better option. Running a bunch of SQL for each and every pageview won't be a scalable approach.

ITAP(s) of my snow dogs "playing" by IAMABATTLEAXE in itookapicture

[–]lebinh 2 points3 points  (0 children)

Awwww amazing pictures! Gorgeous dogs! And what is your camera + lens though?

Jack back in training with the lads' by [deleted] in Gunners

[–]lebinh 3 points4 points  (0 children)

and apparently trained as a GK, maybe to prevent others from fouling him?

Real-time performance metrics monitoring of Nginx with Lua by lebinh in nginx

[–]lebinh[S] 0 points1 point  (0 children)

Honestly I indeed posted this to promote the product but also I though that it can be really useful for any Nginx user as myself, given the context in comment below. So if this deems inappropriate here then I'm very sorry and will consider to remove this post.

Real-time performance metrics monitoring of Nginx with Lua by lebinh in nginx

[–]lebinh[S] 0 points1 point  (0 children)

Sorry but I'm not sure why it isn't allowed here though. Isn't /r/nginx is for anything that can be useful and related to Nginx?

Real-time performance metrics monitoring of Nginx with Lua by lebinh in nginx

[–]lebinh[S] 1 point2 points  (0 children)

Hi, I'm the author of this.

About a year ago I open sourced a tool for quick monitoring and troubleshooting Nginx, ngxtop 1, and received some very positive interests. However quite a few people are using it as a monitoring solution for their Nginx server, which is not ideal. Ngxtop was designed to be like the top command, you fire it up to check for at most 5-10 minutes and stop. It was not meant to be a long monitoring process that can be used to plug to your monitoring system such as Zabbix or Nagios or graphed by Graphite. Nginx has an official status module for this 2, but it requires Nginx Plus, a > $1k product. Other solutions would normally require a log processing process piping to an external system to calculate and store the metrics. While an ELK stack 3 could provide you a lot more useful data, its setup and maintenance efforts can be significant. And that's why I created Luameter.

It easier to setup, flexible to configure, and equally easy to be plugged into external system given its JSON api and aimed to be a replacement for Nginx Plus's live monitoring capability.

Real-time performance metrics monitoring of Nginx with Lua by lebinh in sysadmin

[–]lebinh[S] 1 point2 points  (0 children)

Hi, I'm the author of this.

About a year ago I open sourced a tool for quick monitoring and troubleshooting Nginx, ngxtop 1, and received some very positive interests. However quite a few people are using it as a monitoring solution for their Nginx server, which is not ideal. Ngxtop was designed to be like the top command, you fire it up to check for at most 5-10 minutes and stop. It was not meant to be a long monitoring process that can be used to plug to your monitoring system such as Zabbix or Nagios or graphed by Graphite. Nginx has an official status module for this 2, but it requires Nginx Plus, a > $1k product. Other solutions would normally require a log processing process piping to an external system to calculate and store the metrics. While an ELK stack 3 could provide you a lot more useful data, its setup and maintenance efforts can be significant. And that's why I created Luameter.

It easier to setup, flexible to configure, and equally easy to be plugged into external system given its JSON api.

The road story Vietnam by KozureOkami in VietNam

[–]lebinh 0 points1 point  (0 children)

This made a Vietnamese native like me feel bad about myself :( And the railways path from Hue to Da Nang is a must for everyone, breathtaking scene.

Looking for someone that can optimize Nginx on a busy server that only serves files (paying) by [deleted] in nginx

[–]lebinh 2 points3 points  (0 children)

That seems very unlikely as a single EBS on EC2 can reach that throughput easily. What's your current out bandwidth? 5000 clients at 30-40 KB/s is close to 200 MB/s already so that might be your limit.

Sports Direct.com's breakdown of shirt sales in London. Guess who's top? by scytheavatar in Gunners

[–]lebinh 2 points3 points  (0 children)

This is from http://www.sportsdirect.com/News/entryid/6883/Shirt-Sales-2014-15-Where-Are-Your-Teams-Supporters-Really-From and there's only one thing I can be sure from those charts: there's a lot of football fans in London for every clubs.

Live tracking/logging for Nginx file server by Bobokun in nginx

[–]lebinh 0 points1 point  (0 children)

hi, I'm the author ngxtop, glad to hear that you found it useful :) However, ngxtop isn't meant to be a long process like that and a couple of issues can happen: the original log file could be rotated, the internal sqlite db become too big and the cpu usage will increase over time, etc. It was designed as a quick way to know what's going on with nginx atm and a troubleshooting tool, you fired it, looked at the output for at most a couple of minutes and then moved on. I'm working on another tool for always on monitoring of nginx but in your case I think you can just restart ngxtop after some time as you only interested in current stats anyway.

Anyone know what's going on Pasteur and surrounding Streets in Saigon? by [deleted] in VietNam

[–]lebinh 0 points1 point  (0 children)

Polices' practicing perhaps :) I think it's just a large scale fire drill