Skip to content

Instantly share code, notes, and snippets.

View Iristyle's full-sized avatar

Ethan J. Brown Iristyle

View GitHub Profile
@Iristyle
Iristyle / BootstrapCanary.ps1
Created August 20, 2012 20:58
Bootstrap Chrome Canary on Windows - No Worky!
$chromeExtensions = @'
{
"extensions": {
"settings": {
"fdmmgilgnpjigdojojpjoooidkmcomcm": {
"active_permissions": {
"api": [ "cookies" ],
"explicit_host": [ "http://*/*", "https://*/*" ],
"scriptable_host": [ "http://getpostman.com/*", "https://getpostman.com/*" ]
},
@Iristyle
Iristyle / Start-Vagrant.bat
Created March 15, 2013 18:35
Windows startup script to fire up a Vagrant VM safely on boot (using Run registry key for instance)
ECHO OFF
cd /d %~dp0
for /f "tokens=2* delims= " %%F IN ('vagrant status ^| find /I "default"') DO (SET "STATE=%%F%%G")
ECHO Close this window if it remains open, and http://localhost:8081 is responsive
IF "%STATE%" NEQ "saved" (
ECHO Starting Vagrant VM from powered down state...
vagrant up
) ELSE (
@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 / 1-tables.md
Last active September 20, 2022 15:16
MLFlow Database Schema

Spin up the docker-compose stack from https://github.com/Toumash/mlflow-docker that populates a mysql instance (with root password toor)

Inside the container, verify with pip that pip install mlflow installed the latest 1.28 version:

(base) root@4900a8349bf0:/# pip show mlflow
Name: mlflow
Version: 1.28.0
Summary: MLflow: A Platform for ML Development and Productionization
Home-page: https://mlflow.org/
@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 / json-polyfill.ps1
Created April 18, 2014 17:54
PS2 JSON Polyfill
function ConvertFrom-JsonString
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, ValueFromPipeline=$true)]
[string]
$Json
)
Add-Type -AssemblyName System.Web.Extensions
@Iristyle
Iristyle / Update-SessionEnvironment.ps1
Created September 16, 2012 14:02
Update the Powershell environment variables based on system state
function Update-SessionEnvironment {
$user = 'HKCU:\Environment'
$machine ='HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment'
#ordering is important here, $user comes after so we can override $machine
$machine, $user |
Get-Item |
% {
$regPath = $_.PSPath
$_ |
@Iristyle
Iristyle / encoding.md
Last active April 1, 2022 14:04
Encoding in Puppet

Basic encoding info

  • ASCII is 0 - 7F (128 total characters) - ASCII is a subset of UTF-8
  • UTF-8 - variable width 1 to 4 bytes
Numberof bytes Bits forcode point Firstcode point Lastcode point Byte 1 Byte 2 Byte 3 Byte 4
1 7 U+0000 U+007F 0xxxxxxx      
2 11 U+0080 U+07FF 110xxxxx 10xxxxxx    
3 16 U+0800 U+FFFF 1110xxxx 10xxxxxx 10xxxxxx  
@Iristyle
Iristyle / go-vscode-debugger-notes.md
Last active March 21, 2022 23:16
Configuring VSCode to add ENV vars when using WSL

Assuming a file like .env in the local workspace folder that looks like

FOO=value
BAR=value2

Add the following to the VSCode settings.json

@Iristyle
Iristyle / Ping-Redis.ps1
Created April 5, 2013 17:03
Powershell PING Redis
$client = New-Object Net.Sockets.TcpClient('localhost', 6379)
$stream = $client.GetStream()
$bytes = [Text.Encoding]::ASCII.GetBytes("PING`r`n")
$stream.Write($bytes, 0, $bytes.Length)
$buffer = New-Object byte[] 32
$read = $stream.Read($buffer, 0, 32)
$response = [Text.Encoding]::ASCII.GetChars($buffer) -join ''
Write-Host "Redis Response to PING: $response"