Skip to content

Instantly share code, notes, and snippets.

View martymcguire's full-sized avatar

Marty McGuire martymcguire

View GitHub Profile
@lorennorman
lorennorman / gist:aaa1848d4dec52aa1cf60549717c396e
Last active May 1, 2026 19:21
SSRF & TOCTOU Attack Explainer

SSRF & TOCTOU Attack Explainer

I learned something today and wanted to share.

Special IP Addresses

There are ranges of IP addresses that mean special things, some refer to:

  • yourself (localhost)
  • other machines on your local network (like other computers you own inside the same datacenter)
  • special networking services (provided by AWS or whomever)

DNS: Normal & Tricky

@maddisondesigns
maddisondesigns / functions.php
Last active September 23, 2026 13:30
Disable AI Support and Remove Connectors Screen in WordPress
/**
* Redirect the new AI Settings > Connectors screen back to the Dashboard so it can't be accessed
*/
function mytheme_admin_redirects() {
global $pagenow;
/* Redirect Connectors screen back to main Dashboard page */
if( $pagenow == 'options-connectors.php' ) {
wp_redirect( admin_url( '/' ), 301 );
exit;
1 REM ARTLUNG START
3 CALL CLEAR
5 CALL CHAR(33, "000000FFFFFFFFFF")
7 CALL VCHAR(11, 1, 33)
11 CALL VCHAR(11, 2, 33)
15 CALL VCHAR(11, 3, 33)
19 CALL VCHAR(11, 4, 33)
23 CALL VCHAR(11, 5, 33)
27 CALL VCHAR(11, 6, 33)
31 CALL VCHAR(11, 7, 33)
@mary-ext
mary-ext / bluesky-osa.md
Last active November 13, 2026 09:00
Bluesky's age assurance sucks, here's how to work around it.

Bluesky's age assurance sucks, here's how to work around it.

Bluesky has implemented age verification measures in response to regional laws that restrict access, prompting users to verify their age through Epic Games' Kids Web Services before they can access adult content.

This sucks, but thankfully there are ways to work around it.

Before diving in: I encourage you to read this entire document, including the

accordion-group {
background-color: #f7f7f7;
border-radius: 0.25em;
display: block;
margin-block-end: 1.5em;
padding: 0.5em 1em;
width: 100%;
}
accordion-group [accordion-trigger] {
@adactio
adactio / geocode.php
Created December 16, 2024 15:04
A PHP script that uses a third-party provider to get latitude, longitude, and zoom level (for use in embedded maps).
<?php
/*
Pass in a string: geocode("The Jolly Brewer, Brighton, East Sussex England")
The output is an array with keys for "latitude", "longitude", and "zoom".
*/
function geocode($location, $provider = "mapquest") {
$return = array();
const calculator = (function () {
/**
* Add two or more numbers together
* @param {...Numbers} nums The numbers to add together
* @return Number The total
*/
function add (...nums) {
let total = nums.length ? nums.shift() : 0;
for (let num of nums) {
@emilyliu7321
emilyliu7321 / bluesky-comments.tsx
Created November 25, 2024 05:39
Integrate Bluesky replies as your blog's comment section
"use client";
/* eslint-disable @next/next/no-img-element */
import Link from "next/link";
import { useState, useEffect } from 'react';
import {
AppBskyFeedDefs,
AppBskyFeedPost,
type AppBskyFeedGetPostThread,
} from "@atproto/api";
<?php
/*
Pass in an array of data that includes the text of the post and an access token e.g.
postToBluesky(array(
'text' => 'Hello World',
'accessToken' => getBlueskyToken()
));
Here's the gist for getting getBlueskyToken():
https://gist.github.com/adactio/1a850920a0554a49f36daf79d776a440
@cferdinandi
cferdinandi / README.md
Created October 7, 2024 17:39
A PHP endpoint for posting to Bluesky

Bluesky PHP endpoint

A PHP endpoint for posting to the Bluesky API.

On Bluesky...

  1. Click Settings.
  2. Click App Passwords.
  3. Click the Add App Password button.
  4. Give it a name, then click Create App Password.