Skip to content

Instantly share code, notes, and snippets.

DieNand / GitInitTerminal
Created Dec 17, 2019
Commands for initialize new git repo and set remote to one on github.
View GitInitTerminal
git remote add origin
git add .
git commit "<insert message>"
git push
git pull
DieNand / curlinwindows
Created Dec 12, 2019
Example of using curl in Windows (powershell). In this case it is actually shorthand for Invoke-RestMethod which differs a bit from curl on Linux
View curlinwindows
curl -Method POST -Uri <url> -ContentType 'application/json' -Body '{"content": "Whatever you want to put in here"}' -UseBasicParsing
Prints output directly to console and prevents the requirement for having to set up Internet Explorer in Windows 10
See for more details.
DieNand / WorkaroundLineEndings
Created Dec 12, 2019
Workaround for line endings in Powershell (some file types require unix like line ending to work, this helps in Windows)
View WorkaroundLineEndings
$file = ".\colors.ppm"
((Get-Content $file) -join "`n") + "`n" | Set-Content -NoNewline $file

Keybase proof

I hereby claim:

  • I am dienand on github.
  • I am dienand ( on keybase.
  • I have a public key whose fingerprint is F241 97C3 8154 05A8 241A A89D 3A11 A588 79C3 382B

To claim this, I am signing this object: