Skip to content

Instantly share code, notes, and snippets.

Ethan J. Brown Iristyle

  • Puppet, Inc.
  • Portland, OR
Block or report user

Report or block Iristyle

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
@Iristyle
Iristyle / docker-agent-clean.ps1
Last active Oct 28, 2019
Script to clean images, volumes and networks, hyper-v VMs and disk cache from degraded Azure CI system / agent
View docker-agent-clean.ps1
Write-Host "Waiting for containers to exit." -NoNewLine
while ($(docker ps -q))
{
Write-Host "." -NoNewLine
Start-Sleep 1
}
Write-Host
Write-Host "Stopping Azure Agent"
Stop-Service vstsagent*
View disable-windows-defender.ps1
# must be run as an admin
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\' -Name DisableAntiSpyware -Value 1
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\' -Name DisableRoutinelyTakingAction -Value 1
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\' -Name ServiceKeepAlive -Value 0
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' -Name 'Exclusions' -ErrorAction Ignore
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Exclusions' -Name 'Exclusions_Paths' -Value 1
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Exclusions' -Name Paths -ErrorAction Ignore
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Exclusions\Paths' -Name 'Complete Drive' -Value 'C:\'
@Iristyle
Iristyle / notes.md
Last active Aug 5, 2019
Setting up DashWare to understand GoPro Hero 7
View notes.md
  • In DashWare, create a new profile and name it GoPro Hero7 Black
  • From the GoPro add, there will already be a number of files in C:\Program Files\GoPro\GoPro Desktop App\telemetrydata\DataProfiles, including the file Hero7BlackGPMF.xml
  • Copy the file from the above directory, overwriting the file at C:\Users\Parity\Documents\DashWare\DataProfiles that is created when the new profile is created inside Dashware

NOTE: There is also a folder at C:\Program Files\DashWare\DataTool\DataProfiles which is irrelevant

More info at:

@Iristyle
Iristyle / gotchas.md
Last active Feb 28, 2019
Migrating Emby from Diskstation package to Docker Container
View gotchas.md
@Iristyle
Iristyle / docker-helpers.ps1
Last active Sep 14, 2018
Docker / LCOW helpers for Windows
View docker-helpers.ps1
function Get-DockerConfigFilePath
{
$path = "${ENV:ALLUSERSPROFILE}\docker\config\daemon.json"
# retrieve the path to daemon.json from docker service config, if present
sc.exe qc docker |
? { $_ -match 'BINARY_PATH_NAME\s*:\s*(.*)' } |
? { $_ -match '--config-file\s*(.*daemon\.json)' }
# found BINARY_PATH_NAME which contains --config-file *AND* file exists
@Iristyle
Iristyle / Pluginsync as Administrator.txt
Created Aug 1, 2018
Pluginsyc as admin vs pluginsync as SYSTEM permission differences
View Pluginsync as Administrator.txt
Path : Microsoft.PowerShell.Core\FileSystem::C:\ProgramData\PuppetLabs\code
Owner : NT AUTHORITY\SYSTEM
Group : NT AUTHORITY\SYSTEM
Sddl : O:SYG:SYD:P(A;OICI;FA;;;SY)(A;OICI;FA;;;BA)
Path : Microsoft.PowerShell.Core\FileSystem::C:\ProgramData\PuppetLabs\facter
Owner : NT AUTHORITY\SYSTEM
Group : NT AUTHORITY\SYSTEM
@Iristyle
Iristyle / notes.md
Created Jul 13, 2018
Puppet::Util::Platform.windows? vs Puppet.features.microsoft_windows?
View notes.md

So we have 2 mechanisms that we use to check whether or not we're on Windows.

In this particular instance, I think we'd prefer to use Puppet::Util::Platform.windows? as I wouldn't expect any cross-platform stubbing to occur in tests.

@Iristyle
Iristyle / get-tasks-with-compat.ps1
Created Mar 28, 2018
Get scheduled tasks with compat
View get-tasks-with-compat.ps1
Get-ScheduledTask | % {
$props = [ordered]@{
TaskName = $psitem.TaskName
# note ErrorAction Ignore needed to prevent conversion problems
Compatibility = $psitem | Select -ExpandProperty Settings | Select -ExpandProperty Compatibility -ErrorAction Ignore
}
New-Object -TypeName PSObject -Property $props
}
@Iristyle
Iristyle / appv-notes.md
Last active Mar 24, 2018
Fun times with Bundler + AppVeyor!
View appv-notes.md

While documenting Bundler behavior to make the chart at https://gist.github.com/Iristyle/8a2214a6dd5aa709ba2a1abd32b4eacd, an interesting scenario was uncovered.

The following diff is a result of running the same code a day apart in AppVeyor. All dependencies downloaded / installed are exactly the same, except:

@Iristyle
Iristyle / bundler-results.md
Last active Mar 26, 2018
Windows Bundler 1.16.1 behavior when transitive dependency aws-sdk-v1 is present (that has json ~> 1.4)
View bundler-results.md
Gemfile gem fetched /
native ext built
--path specified Gemfile.lock system json bundled json gem list bundle exec gem list bundle show json
Ruby 2.1 /
json 1.8.1
gem 'json', '>= 0' fetched 1.8.6
built 1.8.6
json (1.8.6) 1.8.6 1.8.6 (1.8.6, default: 1.8.1) (1.8.6) C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/json-1.8.6
Ruby 2.4 /
json 2.0.4
gem 'json', '>= 0' fetched 1.8.6
built 1.8.6
json (1.8.6) 2.0.4 1.8.6 (default: 2.0.4, 1.8.6) (1.8.6) C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-1.8.6
Ruby 2.1 /<b
You can’t perform that action at this time.