Skip to content

Instantly share code, notes, and snippets.

@grifferz
grifferz / mastodon_well_known.conf
Last active September 27, 2023 08:47
Apache config snippet to redirect Mastodon webfinger
RewriteEngine On
RewriteCond %{QUERY_STRING} ^resource=acct:andy@ [NC]
RewriteRule /.well-known/webfinger https://social.bitfolk.com/.well-known/webfinger?resource=acct:grifferz@social.bitfolk.com [NC,L,R=301]
RewriteCond %{QUERY_STRING} ^resource=acct:grifferz@ [NC]
RewriteRule /.well-known/webfinger https://social.bitfolk.com/.well-known/webfinger?resource=acct:grifferz@social.bitfolk.com [NC,L,R=301]

Assumptions:

  • WordPress is installed at the root of $host
  • WordPress Webfinger is installed - available at Wordpress.org or Github
location ~ /.well-known/webfinger {
        # add_header 'Access-Control-Allow-Origin' '*';

        if ($arg_resource = "") {
                return 400;
 }
@dsandler
dsandler / gist:1f94e95b9ea6cc7d5ec338c41e4b0bcd
Created November 18, 2022 00:31
sloppy static webfinger for apache
# www/.htaccess
RewriteRule ^[.]well-known/webfinger.*$ /profile/me [L]
# www/profile/.htaccess
Header set Content-Type: application/jrd+json
Header set Access-Control-Allow-Origin: "*"
# www/profile/me
{
"subject": "acct:dsandler@dsandler.org",
@cmj
cmj / streams.m3u
Last active January 13, 2024 08:55
#EXTM3U
#EXTINF:0,1plus1
#https://1plus1-rakuten.amagi.tv/playlist.m3u8
#EXTINF:0,24hours Movies
https://muxip-24hoursmovies-klowdtv.amagi.tv/playlist.m3u8
#EXTINF:0,AccuWeather
https://amg00684-accuweatherinc-accuweather-stirr-69yvl.amagi.tv/playlist.m3u8
#EXTINF:0,Action Hollywood Movies
https://actionhollywood-klowdtv.amagi.tv/playlist.m3u8
#EXTINF:0,Agora TV
@oldrup
oldrup / remove_global_styles_and_svg_filters.php
Last active April 11, 2023 20:51
Remove Global Styles and SVG Filters from WP 5.9.1 - 2022-02-27
// Remove Global Styles and SVG Filters from WP 5.9.1 - 2022-02-27
function remove_global_styles_and_svg_filters() {
remove_action( 'wp_enqueue_scripts', 'wp_enqueue_global_styles' );
remove_action( 'wp_body_open', 'wp_global_styles_render_svg_filters' );
}
add_action('init', 'remove_global_styles_and_svg_filters');
// This snippet removes the Global Styles and SVG Filters that are mostly if not only used in Full Site Editing in WordPress 5.9.1+
// Detailed discussion at: https://github.com/WordPress/gutenberg/issues/36834
// WP default filters: https://github.com/WordPress/WordPress/blob/7d139785ea0cc4b1e9aef21a5632351d0d2ae053/wp-includes/default-filters.php
@ruevaughn
ruevaughn / Bug Bounty Resources.txt
Last active April 30, 2024 14:39
My Resources and Links over time to various Tools, Notes, Videos, Papers, Articles, Writeups, and more. Will be moving to my own private hosted Wikipedia soon. Ascii Art Font: Calvin S
╔╦╗╦ ╦ ╔╗ ┬ ┬┌─┐ ╔╗ ┌─┐┬ ┬┌┐┌┬┐┬ ┬ ╦═╗┌─┐┌─┐┌─┐┬ ┬┬─┐┌─┐┌─┐┌─┐
║║║╚╦╝ ╠╩╗│ ││ ┬ ╠╩╗│ ││ │││││ └┬┘ ╠╦╝├┤ └─┐│ ││ │├┬┘│ ├┤ └─┐
╩ ╩ ╩ ╚═╝└─┘└─┘ ╚═╝└─┘└─┘┘└┘┴ ┴ ╩╚═└─┘└─┘└─┘└─┘┴└─└─┘└─┘└─┘
//
()==========>>======================================--
\\
2FA Bypass
@peterkowalski
peterkowalski / ldap-search.sh
Created August 27, 2021 07:56
[LDAP search] LDAP search one-liner with user authentication #ldap
ldapsearch -D "uid=USER_UID,ou=USER_OU1,ou=USER_OU2,o=USER_O" -x -b "o=SEARCH_O" -H ldaps://myldap.example.com -z 5 -l 1 -W
@oofnikj
oofnikj / answerfile
Last active April 26, 2024 17:13
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
#!/bin/bash
#
# Environment configuration for postgresql
# The values for all environment variables will be set in the below order of precedence
# 1. Custom environment variables defined below after Bitnami defaults
# 2. Constants defined in this file (environment variables with no default), i.e. BITNAMI_ROOT_DIR
# 3. Environment variables overridden via external files using *_FILE variables (see below)
# 4. Environment variables set externally (i.e. current Bash context/Dockerfile/userdata)