- Every tool or script you run should create a log event.
- The log event should include as much meta-data as possible, but start with who, what and when.
- These log events should be centralized into something like Logstash.
- Adopt JSON as your logging format.
- Incrementally improve things over time. This is not a big project to take on.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sort directory listing by file date time stamp | |
gci | Sort-Object -Property lastwritetime | |
# Discover session id's for current user sessions | |
quser | |
# Display the processes for a given session id | |
Get-Process | Where-Object {$_.sessionid -eq 5} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# launch powershell with admin privileges | |
# run: | |
# install chocolately | |
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) | |
# update to WMF 5 & powershell version 5 | |
choco upgrade powershell -pre | |
# reboot machine | |
# launch powershell with admin privileges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List vagrant box files downloaded | |
vagrant box list | |
# Remove vagrant box files | |
vagrant box remove <name from list> | |
# Get global status of vagrant environments to find any outliers | |
vagrant global-status | |
# Destroy vagrant box instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*AS A:* user of some sort | |
*I WANT:* accomplish something here | |
*SO THAT:* justify here | |
*WE'LL KNOW WE ARE DONE WHEN:* | |
* goal 1 | |
* goal 2 | |
* goal next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
This is a hodge-podge of various but useful commands that I've discovered | |
while exploring what nano has to offer. I expected these commands to change and | |
often. | |
#> | |
# Enable powershell remoting if it is not already enabled | |
Enable-PSRemoting -Force | |
# You may change "*" to the name or IP of the machine you want to connect to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/remind me at 8:30 tomorrow to remember you are happiest when you're creating, building, or taking things apart so that you learn more about how they work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create test scaffolding | |
New-Fixture -Path HelloWorldExample -Name Get-HelloWorld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Short (50 chars or less) summary of changes | |
More detailed explanatory text, if necessary. Wrap it to | |
about 72 characters or so. In some contexts, the first | |
line is treated as the subject of an email and the rest of | |
the text as the body. The blank line separating the | |
summary from the body is critical (unless you omit the body | |
entirely); tools like rebase can get confused if you run | |
the two together. |
OlderNewer