Skip to content

Instantly share code, notes, and snippets.

View deekayen's full-sized avatar
🏡
Working from home

David Norman deekayen

🏡
Working from home
View GitHub Profile
@deekayen
deekayen / get_guid.ps1
Created October 9, 2023 17:46
Get list of all the GUIDs for uninstalling microsoft applications on Windows.
# https://4sysops.com/archives/find-the-product-guid-of-installed-software-with-powershell/
$UninstallKeys = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall", "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"
$null = New-PSDrive -Name HKU -PSProvider Registry -Root Registry::HKEY_USERS
$UninstallKeys += Get-ChildItem HKU: -ErrorAction SilentlyContinue | Where-Object { $_.Name -match 'S-\d-\d+-(\d+-){1,14}\d+$' } | ForEach-Object { "HKU:\$($_.PSChildName)\Software\Microsoft\Windows\CurrentVersion\Uninstall" }
foreach ($UninstallKey in $UninstallKeys) {
Get-ChildItem -Path $UninstallKey -ErrorAction SilentlyContinue | Where {$_.PSChildName -match '^{[A-Z0-9]{8}-([A-Z0-9]{4}-){3}[A-Z0-9]{12}}$'} | Select-Object @{n='GUID';e={$_.PSChildName}}, @{n='Name'; e={$_.GetValue('DisplayName')}}
}
@deekayen
deekayen / keybase.md
Created January 5, 2023 16:20
keybase.md

deekaying

Keybase proof

I hereby claim:

  • I am deekayen on github.
  • I am deekaying (https://keybase.io/deekaying) on keybase.
  • I have a public key ASAJOKqzXNqQ3kUCveLVlCD_h-Or7sP_FqzY1gQmbK_jEgo

To claim this, I am signing this object:

@deekayen
deekayen / motd
Created November 21, 2021 19:44
Buffalo cowsays N4DKN callsign
_______
< N4DKN >
-------
\
\ _.-````'-,_
_,.,_ ,-'` `'-.,_
/) ( '``-.
(( ) ) `\
\) (_/ )\
| /) ' ,' / \
@deekayen
deekayen / config.yml
Last active September 17, 2021 18:16
Config for cloudflared to use dns-over-https from family filtering DNS providers.
proxy-dns: true
proxy-dns-port: 5053
proxy-dns-upstream:
- https://doh.cleanbrowsing.org/doh/adult-filter/
- https://family.cloudflare-dns.com/dns-query
- https://dns-family.adguard.com/dns-query
@deekayen
deekayen / deekayen_iterm_profile.json
Created December 18, 2020 14:49
My custom iTerm default profile for deekayen-macbook
{
"Working Directory" : "\/Users\/deekayen",
"Prompt Before Closing 2" : 0,
"Selected Text Color" : {
"Green Component" : 1,
"Blue Component" : 0.999828040599823,
"Red Component" : 0.99989014863967896
},
"Rows" : 25,
"Ansi 11 Color" : {
@deekayen
deekayen / twistlock_runtime_container.sh
Created December 7, 2020 19:38
Pull CSV output from the Twistlock API to list vulnerabilities in runtime images and their hosts. Prints to screen.
#!/bin/bash
API="us-east1.cloud.twistlock.com/us-2-158255947"
echo "Logging in..."
JWT="$(curl -s \
-H "Content-Type: application/json" \
-X POST \
-d \
'{
@deekayen
deekayen / README.md
Last active November 18, 2020 21:08
AWS HIPAA eligible services to process, store, and transmit protected health information (PHI) translated to AWS CLI service commands.

Help yourself get a quick idea what services are permitted for HIPAA protected PHI in AWS. AWS gives you a list that's formatted in all the formal marketing names, but this translates it to the AWS CLI commands.

This list was manually generated from the AWS HIPAA Eligible Services Reference based on me using my eyeballs to compare the reference page to the AWS CLI version 2 documentation list of commands. I infered some commands like appconfig as a capability of Systems Manager, or dlm as part of Elastic Block Store which is are permitted services.

You should expect to find errors, omissions, and other legal problems, as you should expect from random, free stuff you find on the Internet.

@deekayen
deekayen / README.md
Last active November 18, 2020 18:36
Loop through AWS accounts to get a list of services they're using. Expects aliases to be already configured and logged-in on saml2aws.

Setup each account alias (e.g. 0440) in ~.saml2aws:

[0440]
app_id               =
url                  = https://yourcompany.okta.com/home/amazon_aws/0oampop23kld3JI9b0x7/272
username             = david.norman@example.com
provider             = Okta
mfa                  = PUSH
skip_verify          = false
@deekayen
deekayen / .aws_config
Last active November 17, 2020 05:03
Connect to AWS using saml2aws 2.27.1 on MacOS installed by homebrew via Okta configured with PUSH MFA.
[profile sandbox]
region = us-east-1
[profile dev]
region = us-east-1
[profile prod]
region = us-east-1
[default]
@deekayen
deekayen / saml-list-all.sh
Last active November 9, 2020 17:22
List all services used in AWS with aws-list-all python pip package.
#!/bin/zsh
saml2aws exec 'aws-list-all query --parallel 1 --region us-east-1 | grep "+++" | cut -d" " -f2 | sort | uniq'