Skip to content

Instantly share code, notes, and snippets.

View gregory-seidman's full-sized avatar

Gregory Seidman gregory-seidman

  • Columbia, MD
View GitHub Profile
@gregory-seidman
gregory-seidman / github_markViewed_func.user.js
Last active October 26, 2023 15:03
GitHub Mark Files Viewed Function
// ==UserScript==
// @name GitHub viewed files utility
// @namespace https://gist.github.com/gregory-seidman/dd8b7a93f4603ef3e484c82d45809a95
// @version 1.0.0
// @description Add function markViewed(CSS attribute pattern on value) to mark files viewed by file pattern
// @downloadURL https://gist.github.com/gregory-seidman/d3d0cae4ea69e8c324b944f4bb165dfa/raw/github_markViewed_func.user.js
// @updateURL https://gist.github.com/gregory-seidman/d3d0cae4ea69e8c324b944f4bb165dfa/raw/github_markViewed_func.user.js
// @author Gregory Seidman
// @match https://github.com/*/pull/*/files*
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com
// ==UserScript==
// @name AWS Close SSO success
// @namespace https://gist.github.com/gregory-seidman/dd8b7a93f4603ef3e484c82d45809a95
// @version 1.0.2
// @description Close the tab after successfully logging in via SSO
// @downloadURL https://gist.github.com/gregory-seidman/b316b877975cb8d3010a7e18e3b1b7b0/raw/aws_close_sso_success.user.js
// @updateURL https://gist.github.com/gregory-seidman/b316b877975cb8d3010a7e18e3b1b7b0/raw/aws_close_sso_success.user.js
// @author Gregory Seidman
// @match https://*.awsapps.com/start/user-consent/login-scoped-success.html?*
// @icon https://www.google.com/s2/favicons?sz=64&domain=awsapps.com
// ==UserScript==
// @name Okta Remember Me
// @namespace https://gist.github.com/gregory-seidman/dd8b7a93f4603ef3e484c82d45809a95
// @version 1.0.2
// @description On this browser, Okta should always remember me
// @author Gregory Seidman
// @downloadURL https://gist.github.com/gregory-seidman/02db78a2ad89cd7621988acdcdf0fb20/raw/okta_remember_me.user.js
// @updateURL https://gist.github.com/gregory-seidman/02db78a2ad89cd7621988acdcdf0fb20/raw/okta_remember_me.user.js
// @match https://*.okta.com/oauth2/v1/authorize?*
// @icon https://www.google.com/s2/favicons?sz=64&domain=okta.com
@gregory-seidman
gregory-seidman / wsl-xdg-open.sh
Created July 18, 2022 20:38
A hacky xdg-open drop-in replacement
#!/bin/sh
# Download this, name it xdg-open, and move it to somewhere early in your
# path on your WSL2 Linux filesystem
usage () {
echo "Usage: $0 <file URL>" >&2
exit 1
}
test $# -ne 1 && usage
// ==UserScript==
// @name AWS SSO Start Page
// @namespace https://gist.github.com/gregory-seidman/dd8b7a93f4603ef3e484c82d45809a95
// @version 1.1.3
// @description Expand all account options
// @author Gregory Seidman
// @downloadURL https://gist.github.com/gregory-seidman/69be84cdd286dd5459cccde10a570ae4/raw/expand-sso-aws-login-options.user.js
// @updateURL https://gist.github.com/gregory-seidman/69be84cdd286dd5459cccde10a570ae4/raw/expand-sso-aws-login-options.user.js
// @match https://*.awsapps.com/start*
// @icon https://www.google.com/s2/favicons?sz=64&domain=awsapps.com
@gregory-seidman
gregory-seidman / AwsSsoCreds.ps1
Created November 2, 2021 20:30
Script to log into AWS via SSO and get credentials that can be used programmatically
#!/usr/bin/env pwsh
param (
[Parameter(Position=0)]
[string]$ProfileFilter = $null,
[switch]$NoLogin
)
if ((Get-Command -ErrorAction SilentlyContinue aws) -eq $null) {
Write-Error "The AWS CLI must be installed, try: winget install Amazon.AWSCLI"
@gregory-seidman
gregory-seidman / focus-aws-sso-authorize-allow.user.js
Last active March 11, 2024 21:28
GreaseMonkey/TamperMonkey script to put input focus on the Allow button for AWS CLI SSO login
// ==UserScript==
// @name AWS SSO Focus Allow button
// @namespace https://gist.github.com/gregory-seidman/dd8b7a93f4603ef3e484c82d45809a95
// @version 1.0.4
// @description Focus authorize allow button when confirming AWS CLI SSO login
// @downloadURL https://gist.github.com/gregory-seidman/33a2f4174871bc42966f34e1e7c4ec01/raw/focus-aws-sso-authorize-allow.user.js
// @updateURL https://gist.github.com/gregory-seidman/33a2f4174871bc42966f34e1e7c4ec01/raw/focus-aws-sso-authorize-allow.user.js
// @author Gregory Seidman
// @match https://*.awsapps.com/start/user-consent/authorize.html?*
// @icon https://www.google.com/s2/favicons?domain=awsapps.com