Skip to content

Instantly share code, notes, and snippets.

View Iristyle's full-sized avatar

Ethan J. Brown Iristyle

View GitHub Profile
@Iristyle
Iristyle / bundler-results.md
Last active March 26, 2018 18:52
Windows Bundler 1.16.1 behavior when transitive dependency aws-sdk-v1 is present (that has json ~> 1.4)
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 /
@Iristyle
Iristyle / appv-notes.md
Last active March 24, 2018 01:00
Fun times with Bundler + AppVeyor!

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 / get-tasks-with-compat.ps1
Created March 28, 2018 06:26
Get scheduled tasks with compat
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 / notes.md
Created July 13, 2018 18:45
Puppet::Util::Platform.windows? vs Puppet.features.microsoft_windows?

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 / Pluginsync as Administrator.txt
Created August 1, 2018 01:09
Pluginsyc as admin vs pluginsync as SYSTEM permission differences
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 / docker-helpers.ps1
Last active September 14, 2018 21:29
Docker / LCOW helpers for Windows
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 / gotchas.md
Last active February 28, 2019 21:56
Migrating Emby from Diskstation package to Docker Container
@Iristyle
Iristyle / notes.md
Last active July 26, 2022 17:02
Setting up DashWare to understand GoPro Hero 7
  • 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 / disable-windows-defender.ps1
Created October 11, 2019 20:28
Disable Windows Defender
# 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 / docker-agent-clean.ps1
Last active May 12, 2020 22:50
Script to clean images, volumes and networks, hyper-v VMs and disk cache from degraded Azure CI system / agent
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*