Skip to content

Instantly share code, notes, and snippets.

View wilsonjackson's full-sized avatar

Majid Burney wilsonjackson

View GitHub Profile
@wilsonjackson
wilsonjackson / superagent-redirect-cookie-bug-repro.js
Created January 24, 2023 00:32
Minimal repro of superagent redirect following breaking cookies
@wilsonjackson
wilsonjackson / session.js
Created August 26, 2021 00:55
Implementation of setProviderSession for node-oidc-provider@7
// This is a replacement for the method Provider.setProviderSession, which was removed in oidc-provider 7.x.
//
// Question in repo about its removal, unanswered at the time of this writing:
// https://github.com/panva/node-oidc-provider/discussions/934
//
// Original 6.x Method source is here:
// https://github.com/panva/node-oidc-provider/blob/2c3a667de583846470921883918f4c4145bef6c6/lib/provider.js
//
// The version in this file has been adjusted in the following significant ways:
// - Removed the `meta` argument, which is no longer supported in 7.x
@wilsonjackson
wilsonjackson / aws-okta-wrapper.sh
Created July 24, 2019 21:55
aws-okta wrapper with GUI prompt for code
#!/usr/bin/env bash
# Detect known terminals and map them to their process name for use with AppleScript.
if [[ ${TERM_PROGRAM} == "Apple_Terminal" ]]; then
terminal="Terminal"
elif [[ ${TERM_PROGRAM} == "iTerm.app" ]]; then
terminal="iTerm2"
fi
function aws_okta() {
@wilsonjackson
wilsonjackson / candykeys.js
Last active December 17, 2015 02:49
Questing hot keys for Candy Box !
// Automatically creates hot keys for each potion/scroll/magic item you can use in a quest using the
// first available letter in the button's text. Special exclusions are made for keys that are used by
// the game itself — if you don't know why, I won't spoil it for you.
// Hot keys can be enabled or disabled by a button at the top of the page, or by pressing CTRL+K or
// CMD+K.
!function (undefined) {
var enabled = false, bindings = {}, reserved = 'IK';
$.each(potions.list, function (i, potion) {
var text = potion.buttonText,