This document lists improvements over the default Linux command line tools.
The list was initially motivated by a blog post by Remy Sharp.
- bat - A replacement for
cat
. - prettyping - Better
ping
.
This document lists improvements over the default Linux command line tools.
The list was initially motivated by a blog post by Remy Sharp.
cat
.ping
.<# | |
.SYNOPSIS | |
A full graceful telnet client using PowerShell and the .NET Framework. | |
.DESCRIPTION | |
This script was made with a view of using it to have full control over the text | |
stream for automating Cisco router and switch configurations. | |
.PARAMETER TelnetHost | |
The address of the server or router hosting the telnet service. |
<# | |
.Synopsis | |
Returns IPv4 address details for the local machine. | |
Information is gathered from the active interface being used by the default route. | |
#> | |
[CmdletBinding()] | |
[OutputType([string])] | |
Param () | |
Write-Verbose -Message ("Begin: " + $MyInvocation.MyCommand.Path) |
Install-Module -Name <module name> -Force
<# | |
.SYNOPSIS | |
Detects if the passed Physical Disk Id is a Solid State Disk (SSD) or a | |
spindle disk. Returns true for an SSD and false for anything else. | |
.DESCRIPTION | |
Use Get-PhysicalDisk to get the Physical Disk Ids for the system you wish | |
to test. This script supports values being passed throught the pipeline. | |
The methods used for detecting are by reading the Nominal Media Rotation |
User Name,First Name,Last Name,Display Name,Job Title,Department,Office Number,Office Phone,Mobile Phone,Fax,Address,City,State or Province,ZIP or Postal Code,Country or Region | |
Porky,Porky,Pig,Porky Pig,Sidekick,ACME,12345,67890,1234567890,0987654321,4000 Warner Blvd,Burbank,CA,91522,USA | |
Daffy,Daffy,Duck,Daffy Duck,Bugs Bunny Sidekick,ACME,12345,67890,1234567890,0987654321,4000 Warner Blvd,Burbank,CA,91522,USA | |
Elmer,Elmer,Fudd,Elmer Fudd,Hunter,ACME,12345,67890,1234567890,0987654321,4000 Warner Blvd,Burbank,CA,91522,USA | |
Bugs,Bugs,Bunny,Bugs Bunny,Lead Character,ACME,12345,67890,1234567890,0987654321,4000 Warner Blvd,Burbank,CA,91522,USA | |
Tweety,Tweety,,Tweety,Cute Bird,ACME,12345,67890,1234567890,0987654321,4000 Warner Blvd,Burbank,CA,91522,USA | |
Sylvester,Sylvester,,Sylvester,Hungry Cat,ACME,12345,67890,1234567890,0987654321,4000 Warner Blvd,Burbank,CA,91522,USA | |
Yosemite,Yosmite,Sam,Yosmite Sam,Gun Slinger,ACME,12345,67890,1234567890,0987654321,4000 Warner Blvd,Burbank,CA,91522,USA | |
Foghorn,Foghorn,Leghorn,Forho |
$logPath = 'D:\Temp\github-ping.log' | |
$title = "Script started at " + (Get-Date) | |
Set-Content -Value $title -Path $logPath | |
Write-Host -Object $title | |
$ip = 'Error' | |
$logIt = $false | |
$count = 0 | |
$result = $null | |
$newResult = $null | |
$newIp = $null |
// server.js | |
const log = require('./logger').child(module) | |
const driver = require('./store/driver') | |
const app = require('./app') | |
const SERVERPORT = process.env.SERVERPORT | |
if (process.listeners('unhandledRejection').length < 1) { | |
process.on('unhandledRejection', (reason, promise) => { | |
console.error(reason) | |
process.exit(1) |
// global-teardown.js | |
module.exports = async function () { | |
await global.__MONGOD__.stop() | |
} |
// http-setup.js | |
const axios = require('axios') | |
const app = require('../../src/server') | |
const log = require('../../src/logger').child(module) | |
module.exports = async function httpSetup () { | |
log.info('HTTP test setup initiated') | |
const listener = app.listen() | |
const port = listener.address().port | |
const baseURL = `http://localhost:${port}/api` |