Commander writes his Nodejs command

1. Introduction to Commander Commander is a lightweight nodejs module, which provides powerful functions of user command line input and parameter parsing. The commander comes from a Ruby project of the same name. The characteristics of commander: Self-recording code Automatic Generation Help Merge short parameters ("ABC"=="- ...

Posted by Amgine on Wed, 10 Jul 2019 01:17:48 +0200

On Callback to Hell

Callback to Hell JavaScript Asynchronous Program Guide What is "Callback Hell"? It's hard to understand asynchronous JavaScript at a glance, or JavaScript programs that use callback functions. For example, the following code: fs.readdir(source, function (err, files) { if (err) { console.log('Error finding files: ' + err) } els ...

Posted by noclist on Tue, 25 Jun 2019 23:07:56 +0200

Building redis cluster with redis-trib.rb

Building Cluster with redis-trib.rbredis-trib.rb is a Ruby-based redis cluster management tool.Common operations such as cluster creation, checking, slot Joey and balancing are simplified by Cluster related commands.Ruby dependency environment needs to be installed before use1. Ruby environment preparationhttps://cache.ruby-lang.org/pub/ruby/2. ...

Posted by juancarlosc on Fri, 21 Jun 2019 23:27:01 +0200

Nginx Construction and Use

I. Introduction Nginx (engine x) is a high performance HTTP and reverse proxy server, as well as an IMAP/POP3/SMTP server. [Introduction to Baidu Encyclopedia] Reverse Delivery and Load Balancing are commonly used Home brew Installation Installation of Nginx, here we use the homebrew tool to install the diagram. As f ...

Posted by mjdamato on Sat, 18 May 2019 17:24:19 +0200

Ruby Array Method Arrangement

Array method collation Method List: all(), any(), none() and one() Testing whether all or part of the elements in an array satisfy a given condition. Conditions can be determined in a block of statements or parameters. append() Equivalent to push() bsearch() Dichotomy Finding Elements bsearch_index() Dichotomy Finds Elements and Returns ...

Posted by ricoche on Tue, 07 May 2019 13:35:03 +0200