Skip to content

Instantly share code, notes, and snippets.

View mattwoolnough's full-sized avatar

mattwoolnough

View GitHub Profile
#As described here: http://boxstarter.org/Learn/WebLauncher
#The command to run, built from the raw link of this gist
#START http://boxstarter.org/package/nr/url?https://gist.github.com/automatonic/7771dfd7015a72453091/raw/4cbbf4811d11929ebe0f98c51f04e7476179c13f/example.boxstarter
#Special windowsy stuff. see http://boxstarter.org/WinConfig
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
Install-WindowsUpdate
Disable-InternetExplorerESC
Verifying that +woolnough is my blockchain ID. https://onename.com/woolnough

title: Events collection: '@items': '@taxonomy.type': event

~
~

title event
Sunday Training
start end repeat until freq
06-03-2016 08:00
06-03-2016 09:30
U
03-04-2025 00:00
weekly
param
(
[parameter(mandatory = $true)] $email
,[parameter(mandatory = $true)] $account
,[parameter(mandatory = $false)] $DemoIndex
)
[System.Diagnostics.Debug]::Write("Starting PowerShell WF")
$domainAndAccount = "FIMDEV\" + $account
if(@(Get-PSsnapin | where-object {$_.Name -eq "FIMAutomation"} ).count -eq 0) {add-pssnapin FIMAutomation}
$template = Get-AuthenticationWorkflowRegistrationTemplate -AuthenticationWorkflowName "Password Reset AuthN Workflow"
# Username of the user to add
$username = "svc_fim_service"
# Domain of the user to add
$domain = "FIMDev"
# Display name to set in the portal
$displayName = "FIM Service Service Account"
Import-Module LithnetRMA
Set-ResourceManagementClient -BaseAddress localhost # -Credentials (Get-Credential)
@mattwoolnough
mattwoolnough / Set-SpnPermissions.ps1
Last active March 8, 2023 18:47
Script to allow an AD account the ability to update it's own SPN attribute
Function Set-SpnPermission {
param(
[String]$obj,
[switch]$Write,
[switch]$Read
)
### Set-SpnPermission -obj "DOMAIN\svc_SQL" -write -read
Import-Module ActiveDirectory
$Identity = [security.principal.ntaccount]$obj
*nix b64 encode binary file
base64 -i ~/Downloads/site.lic
Windows 64 encode binary file
$FileName = "C:\site.lic"
$base64string = [Convert]::ToBase64String([IO.File]::ReadAllBytes($FileName))
$base64string | Out-File "c:\lic.b64.txt"

Just some notes and references for myself.

  • In bash, you can access your C:\ drive via /mnt/c/
  • ~ = C:\Users\MLM\AppData\Local\lxss\home\mlm and is different from your Windows user directory C:\Users\MLM

How to google things

@mattwoolnough
mattwoolnough / create-keystore.sh
Last active May 28, 2017 02:54
Keycloak Certs
#!/bin/sh
DOMAIN=<domain>
KEYSTOREPW=<changeme>
GFDOMAIN=/opt/keycloak-3.1.0.Final/standalone/configuration/
LIVE=/etc/letsencrypt/live/$DOMAIN
sudo openssl pkcs12 -export -in $LIVE/cert.pem -inkey $LIVE/privkey.pem -out cert_and_key.p12 -name myalias -CAfile $LIVE/chain.pem -caname root -password pass:$KEYSTOREPW
sudo keytool -importkeystore -destkeystore keystore.jks -srckeystore cert_and_key.p12 -srcstoretype PKCS12 -alias myalias -srcstorepass $KEYSTOREPW -deststorepass $KEYSTOREPW -destkeypass $KEYSTOREPW