Skip to content

Conversation

@jantari
Copy link

@jantari jantari commented Oct 28, 2018

  • refactored and shortened URL-string creation logic
  • removed unneeded backticks (line-breaks after a pipe are always allowed)
  • added "0.0.0.0" as the default value for the IP parameter instead of setting it later
  • cleaned up regex IP replace and split up the pipeline (get-content and set-content in one pipeline isn't recommended because Get-Content may still have the file opened so Set-Content will fail to write it)
  • replaced all occurences of
`"

(escaped double-quotes) with just ' (single quotes)

  • replaced all instances of
Write-Host `n

with Write-Host "" as

`n

is technically only line-feed but Windows uses CRLF, I think it also looks nicer

- refactored and shortened URL-string creation
- removed unneeded backticks (line-breaks after a pipe are always allowed)
- added "0.0.0.0" as the default value for the IP parameter instead of setting it later
- cleaned up regex IP replace and split up the pipeline (get-content and set-content in one pipeline isn't recommended because
Get-Content may still have the file opened so Set-Content will fail to write it)
- replaced all occurences of `" (escaped double-quotes) with just ' (single quotes)
- replaced all instances of `Write-Host `n` with Write-Host "" as `n is technically only line-feed but Windows uses CRLF, I think it also looks nicer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant