Skip to content

Instantly share code, notes, and snippets.

@servercharlie
servercharlie / gist:62ff819870d17f350c09ebe573b55388
Created March 11, 2017 06:44 — forked from listochkin/gist:1200393
Algorithm for Area of a closed polygon.
@servercharlie
servercharlie / README.md
Created March 11, 2017 06:41 — forked from listochkin/README.md
How Node Resolves Dependencies

How Node Resolves Dependencies

Read more about node_modules and how you can use them in official node/iojs docs:

If the module identifier passed to require() is not a native module, and does not begin with '/', '../', or './', then io.js starts at the parent directory of the current module, and adds /node_modules, and attempts to load the module from that location.

If it is not found there, then it moves to the parent directory, and so on, until the root of the file system is reached.

Here I show you how you can easily build a hierarchy of modules inside your project and use nested node_modules directories to manage dependencies within your application. This is a pretty good solution that doesn't require you to change NODE_PATH, use many git repositories or setting up a private registry.

--log_gc (Log heap samples on garbage collection for the hp2ps tool.)
type: bool default: false
--expose_gc (expose gc extension)
type: bool default: false
--max_new_space_size (max size of the new generation (in kBytes))
type: int default: 0
--max_old_space_size (max size of the old generation (in Mbytes))
type: int default: 0
--max_executable_size (max size of executable memory (in Mbytes))
type: int default: 0
@servercharlie
servercharlie / docker_0.md
Created March 8, 2017 10:55 — forked from goyalankit/docker_0.md
Docker Commands

Docker cheatsheet.

  • To get the list of commands:

      $ docker
    
  • To search for images in docker index:

      $ docker search tutorial
    
@servercharlie
servercharlie / js-crypto-libraries.md
Created March 8, 2017 09:42 — forked from jo/js-crypto-libraries.md
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

I start with a list and plan to create a comparison table.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.