Skip to content

Instantly share code, notes, and snippets.

@jjafuller
jjafuller / materalize_symlinks.py
Created December 24, 2023 21:23
Materialize Symlinks
@jjafuller
jjafuller / AutoHotKey Strip Trackers on Paste.ahk
Last active May 17, 2020 15:57
AutoHotKey Strip Trackers on Paste
#NoEnv ; recommended for performance and compatibility with future autohotkey releases.
#UseHook
#InstallKeybdHook
#SingleInstance force
SendMode Input
;; deactivate capslock completely
SetCapslockState, AlwaysOff
@jjafuller
jjafuller / HammerSpoon Strip Trackers on Paste.lua
Last active May 17, 2020 15:56
HammerSpoon Strip Trackers on Paste
url = "https://gopro.com/en/us/shop/cameras/hero8-black/CHDHX-801-master.html?utm_source=Facebook&utm_medium=DirectResponse&utm_campaign=IR100Off&&fbclid=IwAR2qDFVHq0MhKNiMbe5HiAwOVZCXRf5bdTt8gxVH8bE3csOQP9fcbQMc0QM#hero8black"
s = string.gsub(url, "utm_[%w_]+=[%w_]+&?", "")
s = string.gsub(s, "fbclid=[%w_]+&?", "")
s = string.gsub(s, "?&*#", "#")
s = string.gsub(s, "[&?]*$", "")
print(s)
-- https://gopro.com/en/us/shop/cameras/hero8-black/CHDHX-801-master.html#hero8black
@jjafuller
jjafuller / keybase.md
Last active February 8, 2019 17:35
keybase.md

Keybase proof

I hereby claim:

  • I am jjafuller on github.
  • I am jjafuller (https://keybase.io/jjafuller) on keybase.
  • I have a public key ASDQSdWgDQ9TICCLO-DvLJbysbrA4zty32AhK2QiOD_tyAo

To claim this, I am signing this object:

public class CacheControlMiddleware
{
private const string JWKS_URL_PATH = "/.well-known/openid-configuration/jwks";
// Because ASP.NET Core uses this PathString struct to store the URL Path in
// in the HttpContext that gets passed through the Owin pipeline.
private static readonly PathString JwksUrlPath = new PathString(JWKS_URL_PATH);
private static readonly string CacheControlHeaderValue = $"max-age={TimeSpan.FromHours(1).TotalSeconds}";