Skip to content

Instantly share code, notes, and snippets.

View sheldonhull's full-sized avatar
👋
Hi! Who keeps their github status up to date? You get a 🌮 just for reading this

sheldonhull sheldonhull

👋
Hi! Who keeps their github status up to date? You get a 🌮 just for reading this
View GitHub Profile
@sheldonhull
sheldonhull / op_session.sh
Created October 6, 2022 17:22 — forked from scottrbaxter/op_session.sh
1password cli session check and expiration variable
#!/usr/bin/env bash
# starts (or restarts) a 1password cli session, sets 30 minute countdown variable
# use: OP_CLOUD_ACCOUNT="[your-account-name]" source /path/to/op_session.sh command
# e.g.: OP_CLOUD_ACCOUNT="familyname" source ~/op_session.sh get account
check_session(){
# attempt sign in if session is not active
@sheldonhull
sheldonhull / larger-sg-selector.user.js
Created August 14, 2019 19:12 — forked from ryotarai/larger-sg-selector.user.js
Larger Security Group selector (AWS RDS and Elasticache / tested with Tampermonkey)
// ==UserScript==
// @name Larger SG Selector
// @namespace http://ryotarai.info/
// @version 0.1
// @description Why is it too small?
// @author Ryota Arai
// @match https://*.console.aws.amazon.com/*
// @grant none
// ==/UserScript==
@sheldonhull
sheldonhull / translate_aws.js
Created August 14, 2019 19:12 — forked from ideasasylum/translate_aws.js
A Chrome UserScript to replace AWS names with sensible stuff
// ==UserScript==
// @name Translate Amazon
// @namespace http://ideasasylum.com
// @version 0.1
// @description Translate the Amazon service names into plain English. See https://www.expeditedssl.com/aws-in-plain-english
// @author @ideasasylum
// @match https://*.console.aws.amazon.com/console/home?*
// @grant none
// ==/UserScript==
// ==UserScript==
// @name AWS - Cloudwatch - Remove Insights Trial Banner
// @namespace https://github.com/david-duncan
// @version 0.1
// @description AWS cloudwatch has an annoying insights trial banner that pops up everytime. This removes it permanently
// @author David Duncan
// @grant none
// @match https://console.aws.amazon.com/cloudwatch/*
// @run-at document-end
// ==/UserScript==
@sheldonhull
sheldonhull / aws-notification-timer.user.js
Created August 14, 2019 19:10 — forked from jamesinc/aws-notification-timer.user.js
AWS console notification dismisserator 9000 - dismiss AWS flash notifications after (about) 5 seconds
// ==UserScript==
// @name AWS console notification dismisserator 9000
// @namespace https://github.com/jamesinc
// @version 1.0
// @description Dismiss AWS flash notifications after about 5 seconds
// @author James Ducker
// @match https://*.console.aws.amazon.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
@sheldonhull
sheldonhull / ShowLocaltimeInCWMC.user.js
Created August 14, 2019 19:10 — forked from j3tm0t0/ShowLocaltimeInCWMC.user.js
Show Localtime in CloudWatch Management Console
// ==UserScript==
// @name ShowLocaltimeInCWMC
// @namespace j3tm0t0.gmail.com
// @description Show Localtime in CloudWatch Management Console
// @include https://console.aws.amazon.com/cloudwatch/home*
// @version 1.1
// ==/UserScript==
$(document).ready(function(){
var f=function()
{
// ==UserScript==
// @name AWS Console Activator
// @description AWS Console Activator
// @match https://console.aws.amazon.com/*
// ==/UserScript==
(function() {
var interval = 1000*60;
setInterval(function() {$("#refresh_btn-button").click()}, interval);
})();
@sheldonhull
sheldonhull / Install-PowerShellService.ps1
Created August 13, 2019 16:39 — forked from fireflycons/Install-PowerShellService.ps1
Script to install a PowerShell script as a Windows Service using NSSM
<#
.SYNOPSIS
Installs PowerShell scripts as Windows Services.
.DESCRIPTION
Installs or removes PowerShell script services.
When installing, any additional command line arguments besides the mandatory ones are supplied as arguments to the script you are installing, and credentials for the service will be prompted for.
The service will be installed for automatic start, however the initial state is 'Stopped'
This tool will additionally pass the switch -Service to the target script which it should implement to know it is running as a service.
function Add-EnvPath {
param(
[Parameter(Mandatory=$true)]
[string] $Path,
[ValidateSet('Machine', 'User', 'Session')]
[string] $Container = 'Session'
)
if ($Container -ne 'Session') {
@sheldonhull
sheldonhull / Write-SSMComplienceItemExample
Created April 5, 2019 18:58 — forked from austoonz/Write-SSMComplianceItemExample
Sample code for writing an AWS Systems Manager Compliance Item.
$managedInstanceId = (Get-Content -Path 'C:\ProgramData\Amazon\SSM\InstanceData\Vault\Store\RegistrationKey' -Raw | ConvertFrom-Json).instanceID
$moduleNames = @(
'AWSPowerShell',
'ClipboardText',
'Convert',
'PSWindowsUpdate'
)
$complianceItems = [System.Collections.Generic.List[Amazon.SimpleSystemsManagement.Model.ComplianceItemEntry]]::new()
foreach ($moduleName in $moduleNames)