I hereby claim:
- I am bmcguirk on github.
- I am brianjmcguirk (https://keybase.io/brianjmcguirk) on keybase.
- I have a public key whose fingerprint is 48CC 09B7 1096 5112 A69B DF70 F004 6168 B4EC C058
To claim this, I am signing this object:
| # A Powershell Script to Get AD Machines from a certain OU and then query/export a CSV of their installed software inventory. | |
| # 2019-10-17 - v1 - Author: Brian McGuirk - The Script works, but could maybe use a progress bar. Next up. | |
| # 2019-11-14 - v2 - Author: Brian McGuirk - Added a progress bar. Limited properties to just useful ones. I think. | |
| # Pre-requisites: | |
| # - The Active Directory Powershell modules. In Windows 10, this should be an enable-able "Optional Feature." | |
| # - The target machines must WMI enabled. | |
| # Go here for more information: https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmi-start-page | |
| Write-Host "Starting Inventory Script..." | |
| # THE SCRIPT | 
| // Need to paste into "User Overrides" section of "Advanced Settings Editor" in JupyterLab. | |
| // Source of name of command from editmenu: | |
| // https://github.com/jupyterlab/jupyterlab/blob/3ea6a39264f44694febc9357578ffcb43b4f1780/packages/mainmenu-extension/src/index.ts#L42 | |
| { | |
| "editmenu:clear-current": { | |
| "command": "editmenu:clear-current", | |
| "keys": [ | |
| "Ctrl Shift O" | |
| ], | 
| # Converts a bunch of images into a gif. | |
| # Relies on Pillow and glob | |
| from PIL import Image | |
| import glob | |
| # Glob to regex the right files. Returns a list. | |
| png_files = glob.glob("*.png") | |
| # Bulk-open selected images. | |
| ims = [Image.open(i) for i in png_files] | 
| #!/bin/bash | |
| # | |
| # DESCRIPTION: | |
| # | |
| # Set the bash prompt according to: | |
| # * the active virtualenv | |
| # * the branch/status of the current git repository | |
| # * the return value of the previous command | |
| # * the fact you just came from Windows and are used to having newlines in | |
| # your prompts. | 
| # Full credit to Pete here: http://www.createdbypete.com/articles/simple-way-to-find-broken-links-with-wget/ | |
| wget --spider -nd -o ~/wget.log -e robots=off -w 1 -r http://www.example.com | |
| grep -B 2 '404' example.com.log >> example.com.404.log | 
| # Complete credit to Microsoft here: https://blogs.technet.microsoft.com/ashleymcglone/2016/02/26/install-the-active-directory-powershell-module-on-windows-10/ | |
| # And Here: https://gallery.technet.microsoft.com/Install-the-Active-fd32e541 | |
| # Script follows: | |
| #requires -RunAsAdministrator | |
| <#----------------------------------------------------------------------------- | |
| Ashley McGlone, Microsoft Premier Field Engineer | |
| http://aka.ms/goateepfe | |
| February 2016 | |
| Install-ADModule | 
I hereby claim:
To claim this, I am signing this object:
I found this super useful, so I'm reposting directly from Matt Butcher's site:
Often times, I want to create a full directory structure, and I'd like to do it with just one call to mkdir. That is, I want to create a root directory and multiple subdirectories all at once. Here's how to do this.
mkdir -p myProject/{src,doc,tools,db}
The above creates the top-level directory myProject, along with all of the subdirectories (myProject/src, myProject/doc, etc.). How does it work? There are two things of note about the command above:
-p flag: This tells mkdir to create any leading directories that do not already exist. Effectively, it makes sure that myProject gets created before creating myProject/src.