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 / 1-1000.txt
Last active March 27, 2024 21:34
1,000 most common US English words
the
of
to
and
a
in
is
it
you
that
@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 / ListAllOldBuilds.py
Created September 5, 2017 14:14
A python script you could run in Jenkins to find all jobs which the latest build is older than 6 months.
from jenkins import Jenkins, JenkinsError, Job, Server
# http://jenkins-webapi.readthedocs.org/en/latest/
from jira.client import JIRA
import re
import xml.etree.ElementTree as ET
import sys
import time
import requests
#Jenkins connection
@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 / fix-ssh-agent.sh
Created June 21, 2013 03:59
Fix ssh-agent key agent forwarding on a new Mac OS X install.
#!/bin/sh
sudo touch /var/db/useLS
reboot
@deekayen
deekayen / resize_instance.yml
Created July 3, 2019 17:21
Resize EC2 instances using Ansible Tower.
---
- hosts: all
connection: local
gather_facts: no
pre_tasks:
- debug:
var: ansible_limit
verbosity: 1
@deekayen
deekayen / ConfigureRemotingForAnsible.ps1
Last active March 10, 2022 15:31
Configure WinRM for Ansible powershell using SHA-2 certificate
#Requires -Version 3.0
# Configure a Windows host for remote management with Ansible
# -----------------------------------------------------------
#
# This script checks the current WinRM (PS Remoting) configuration and makes
# the necessary changes to allow Ansible to connect, authenticate and
# execute PowerShell commands.
#
# All events are logged to the Windows EventLog, useful for unattended runs.
@deekayen
deekayen / .gitlab-ci.yml
Last active January 14, 2022 07:32
Scan a docker contianer with Prisma Cloud Twistlock twistcli and report the results to the Prisma Cloud dashboard. Some variables are stored in the repository's CI variables configuration in the GitLab web interface. The $prisma_cloud_compute_url should be something like https://us-east1.cloud.twistlock.com/us-2-1111111111111, not https://api2.p…
prisma-cloud:
tags:
- kubernetes
stage: test
image: docker:stable
services:
- name: docker:dind
entrypoint: ["env", "-u", "DOCKER_HOST"]
command: ["dockerd-entrypoint.sh"]
variables:
@deekayen
deekayen / motd
Created November 21, 2021 19:44
Buffalo cowsays N4DKN callsign
_______
< N4DKN >
-------
\
\ _.-````'-,_
_,.,_ ,-'` `'-.,_
/) ( '``-.
(( ) ) `\
\) (_/ )\
| /) ' ,' / \
@deekayen
deekayen / .sparkleshare
Last active October 29, 2021 22:08
Automate conversion of Drupal modules to Backdrop with bash utilities.
adbd68fd1cc1b47bc11567b0acc003a56153b2c2