Skip to content

Instantly share code, notes, and snippets.

View eduardnow's full-sized avatar

Eduard Castro eduardnow

View GitHub Profile
@eduardnow
eduardnow / chmod-400.cmd
Created May 29, 2020 21:36 — forked from jaskiratr/chmod-400.cmd
Set permission of file equivalent to chmod 400 on Windows.
# Source: https://stackoverflow.com/a/43317244
$path = ".\aws-ec2-key.pem"
# Reset to remove explict permissions
icacls.exe $path /reset
# Give current user explicit read-permission
icacls.exe $path /GRANT:R "$($env:USERNAME):(R)"
# Disable inheritance and remove inherited permissions
icacls.exe $path /inheritance:r
@eduardnow
eduardnow / 0_reuse_code.js
Created June 27, 2016 16:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console