Tools developed using Node which is for CLI use.
- check-memory Check memory of node v8
- test-mysql Test MySQL connection
- test-pg Test Postgresql connection
- now now Display current time
- rand rand Generate random float number
- rand-int rand-int Generate random integer number
- CRLF Check or set file if it contains LF/CR/CRLF.
ngt check-memory
Check memory of node v8 via heapStatistics
Example output
Default max-old-space-size: 4144 MB
{
"total_heap_size": 17649664,
"total_heap_size_executable": 524288,
"total_physical_size": 17649664,
"total_available_size": 4336030704,
"used_heap_size": 9011528,
"heap_size_limit": 4345298944,
"malloced_memory": 524432,
"peak_malloced_memory": 1042088,
"does_zap_garbage": 0,
"number_of_native_contexts": 2,
"number_of_detached_contexts": 0,
"total_global_handles_size": 8192,
"used_global_handles_size": 2592,
"external_memory": 2021759
}
Test MySQL connection string.
ngt test-mysql mysql://derek:xxxxxx@localhost/db1
Test postgresql connection string. Server must use SSL.
ngt test-pg postgres://postgres:xxxxxxxx@localhost/postgres
Show current date and time
ngt now
Generate random float number with min value and max value
minValue <= output < maxValue
ngt rand
ngt rand 1 100
Generate random integer number with min value and max value
minValue <= output < maxValue
ngt rand-int
ngt rand-int 1 100
Check or set file if it contains LF/CR/CRLF.
Check if it contains LF/CR/CRLF.
ngt crlf fish.txt
Set file as LF.
ngt crlf fish.txt lf
Set file as CR.
ngt setcr fish.txt cr
Set file as CRLF.
ngt crlf fish.txt crlf
npm install -g node-global-tool
ngt check-memory