Skip to content

Instantly share code, notes, and snippets.

Working from home

Nick Shores nshores

Working from home
Block or report user

Report or block nshores

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Dapacruz / Redirect-VMHostLogs.ps1
Last active Oct 16, 2018
Redirect VMware ESXi Host Logs
View Redirect-VMHostLogs.ps1
$hosts = '*'
$datastore_name = 'NS-VMFS-01'
$datastore = Get-Datastore -Name $datastore_name | Select-Object -First 1
$log_dir = '[{0}] Logs' -f $datastore.Name
$scratch_location = '{0}/Logs' -f $datastore.ExtensionData.Info.Url -replace 'ds://'
foreach ($h in (Get-VMHost $hosts | Sort-Object -Property Name)) {
Write-Host "$($h.Name): Redirecting log files ..."
$result = Get-AdvancedSetting -Entity $h -Name | Set-AdvancedSetting -Value "$log_dir/$h" -Confirm:$false
Write-Host "New syslog location: $($result.Value)"
Dapacruz / Configure-Ntp.ps1
Created Dec 7, 2017
Configure/Enable NTP on a VMware ESXi Host
View Configure-Ntp.ps1
$hosts = '*'
$ntp_servers = '', ''
Get-VMHostService -VMHost $hosts | Where-Object {$_.key -eq 'ntpd'}
Get-VMHostNtpServer -VMHost $hosts
Add-VMHostNtpServer -VMHost $hosts -NtpServer $ntp_servers
Get-VMHostService -VMHost $hosts | Where-Object {$_.key -eq 'ntpd'} | Start-VMHostService | Set-VMHostService -Policy 'automatic'
prasanthj / lirc-pi3.txt
Last active Feb 6, 2020
Getting lirc to work with Raspberry Pi 3 (Raspbian Stretch)
View lirc-pi3.txt
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]).
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch.
Following are the changes that I made to make it work.
$ sudo apt-get update
$ sudo apt-get install lirc
# Add the following lines to /etc/modules file
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
mobzystems / Start-FileSystemWatcher.ps1
Last active May 17, 2019
Using a FileSystemWatcher from PowerShell
View Start-FileSystemWatcher.ps1
# Start-FileSystemWatcher.ps1 - File System Watcher in Powershell.
# Brought to you by MOBZystems, Home of Tools
# The path to monitor
[Parameter(Mandatory=$true, Position=0)]
# Monitor these files (a wildcard)
morisy / Reset-LocalAccountPassword.ps1
Created Mar 8, 2017
This article presents a new script, Reset-LocalAccountPassword.ps1, which makes it easier and more secure to reset local account passwords on computers.
View Reset-LocalAccountPassword.ps1
# Reset-LocalAccountPassword.ps1
# Written by Bill Stewart (
#requires -version 2
Resets the built-in Administrator account or a named local account password on one or more computers.
savetheclocktower /
Last active Jan 14, 2020
Poor-man's LEDBlinky with RetroPie and Pac-Drive

NOTE: This Gist was an early write-up of this blog post, part of what became an eleven-part series on my arcade cabinet. I'd suggest you read that post instead of this, but some of the comments on this Gist contain updates and field reports that you might find useful.

RetroPie, LED control, and you

I wanted LEDBlinky-style functionality out of my RetroPie cabinet. But I didn't need RGB control or magical frontend integration or anything like that. I had buttons with simple single-color LEDs.

I've got a simple control panel with six buttons per player. All I wanted was this:

  • When I launch Street Fighter 2, all twelve buttons should light up.
  • When I launch The Simpsons, only the first two buttons for each player should light up.
jsanz /
Last active Jan 10, 2019
Making a OVA file compatible with VMWare

This is a recipe to fix this error when importing to VMWare an OVA file:

Download and install OVFTool (

Convert OVA to VMX using the command below (this will create example.vmx)

$ ovftool example.ova example.vmx
Jaykul / Get-MsdnKeys.ps1
Last active Feb 14, 2020
PowerShell + Selenium Demo: Getting Started, and reusing cookies with Invoke-Request
View Get-MsdnKeys.ps1
# It might work in 4, but I'm not testing there. Lower you'll have to tweak code
#requires -Version 5.0
# Your Live ID for MSDN login
# Pick a browser to use. Defaults to Firefox (which doesn't seem to require an external Driver file)
ipbastola /
Last active Feb 13, 2020
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64


Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
alirobe / reclaimWindows10.ps1
Last active Feb 15, 2020
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of (different defaults). N.…
View reclaimWindows10.ps1
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <>
# Modified by: alirobe <> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source:
# Tweaked Source:
# Tweak difference:
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
You can’t perform that action at this time.