Skip to content

Instantly share code, notes, and snippets.

View Iristyle's full-sized avatar

Ethan J. Brown Iristyle

View GitHub Profile
@Iristyle
Iristyle / gist:5005653
Created February 21, 2013 15:53
Configure HAProxy for userlists

Create SHA512 passwords

# make sure to use a leading space so that the command is not stored in your bash history!!
 mkpasswd -m sha-512 password1
# generates -> $6$yMgsow58.g/Z$mBjHfdVzqcF/LN.iwV23Eyqg.yGPTsp9pOwaStsJ6c4I4zL7BhucVVAkv5guf7OVRr8Pw0mHF4NrWBRCG5ci7/
 mkpasswd -m sha-512 password2
# generates -> $6$RZ86vRkQ$aRKN1HOsk6bDHBbMhS7jSo/p1NGFl4PvwY3KpU.72i./LvITi41nL84EkxOFXl.6Bmhynj/L7pYbfF0rUHtOB0
@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