Skip to content

Instantly share code, notes, and snippets.

View jamiehowarth0's full-sized avatar

Jamie Howarth jamiehowarth0

View GitHub Profile
@troyhunt
troyhunt / rick-roll-content-scraper.js
Created August 19, 2020 07:41
A Cloudflare worker to redirect image requests from dickhead content scraper's site to a Rick Roll
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
async function fetchAndApply(request) {
let response = await fetch(request)
let referer = request.headers.get('Referer')
let contentType = response.headers.get('Content-Type') || ''
if (referer && contentType.startsWith('image/')) {
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active June 29, 2025 10:35 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@jeremymoore
jeremymoore / gist:82bebfbf164a07f63ea3ef4cdf5a1cd7
Last active February 19, 2025 01:39
Web.Config for running Wordpress as a subdirectory on IIS. Additionally, created support for accessing the REST API, which changes routes to match the Site URL.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="static" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_URI}" matchType="Pattern" pattern="/wordpress/*" negate="true" />
<add input="{REQUEST_URI}" matchType="Pattern" pattern="/wp-json/*" negate="true" />
@kyledrake
kyledrake / ferengi-plan.txt
Last active June 14, 2025 22:48
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {