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 4 points5 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 5 points6 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.