Skip to content

Instantly share code, notes, and snippets.

View boogah's full-sized avatar
😶‍🌫️

Jason Cosper boogah

😶‍🌫️
View GitHub Profile
@hartsick
hartsick / masto-guide-for-friends.md
Last active April 6, 2023 19:39
My tips for friends thinking of joining Mastodon

A guide for friends considering Mastodon

A lot of my friends have recently been considering leaving Twitter for other networks, and many are considering Mastodon. There are many guides floating about that can tell you about Mastodon and the Fediverse, which is really exciting! It can be overwhelming to sort through them all, though, and honestly I haven't read them since I know my way around.

So, this is the blog version of me sitting down with a friend explaining what I know about Mastodon and how I'd recommend approaching setting up an account there for the first time and getting oriented.

What's in this:

  1. What is the Fediverse / Mastodon?
  2. Why would I want to join?
  3. Where do I start?
<?php
/**
* Pressjitsu Remote HTTP Cache
*
* Many plugins like to perform remote HTTP requests for front-end visits,
* sometimes without even employing transient caching. We think that *all* HTTP
* requests should run in the background, and thus be always served from cache,
* even if the cache is stale.
*
* Configure cachable hosts via the pj_http_cache_hosts filter.
@jenkoian
jenkoian / wp-plugin-mutation-test.sh
Created December 23, 2021 17:06
Small bash script to do some _very_ basic plugin mutation testing against a website. i.e. check the site doesn't fall over if a random plugin is deactivated.
#!/usr/bin/env bash
URL_TO_CHECK=${1}
if [ -z "$URL_TO_CHECK" ]; then
echo 'Please supply a URL'
exit 1;
fi
WP="wp"
@glaszig
glaszig / mkp2pblocklist
Last active January 30, 2022 00:30
creates a blocklist for your p2p endeavors
#!/usr/bin/env sh
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2020 glaszig <glaszig@gmail.com>
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
@norcross
norcross / disable-username-login.php
Last active July 11, 2017 19:44
Force a redirect if a certain username is attempted.
<?php
add_filter( 'authenticate', 'rkv_disable_username_logins', 20, 3 );
/**
* Disable admin username and redirect to Google (or another site).
*
* @param object $user The WP_User object.
* @param string $username The entered username.
* @param string $password The entered password.
*
@joepie91
joepie91 / 1_changelog.md
Last active March 27, 2018 00:20
Remove Wired / V3 "ad-blocker veil"

Supported sites:

  • Wired
  • V3.co.uk

Requests for other sites are welcome (admin@cryto.net).

Changelog

  • July 25, 2016: Added support for V3.co.uk.
<?php
/*
* Plugin Name: Remove crazy counts slowing down my dashboard
* Plugin URI: https://pmgarman.me
* Description: Those comment counts are such a pain when you have a lot of comments
* Author: Patrick Garman
* Author URI: https://pmgarman.me
* Version: 1.0.0
* License: GPLv2
*/
@krogsgard
krogsgard / template-file.php
Last active January 29, 2016 17:21
Stuff for wrangling Jetpack. End result is along these lines: https://cldup.com/8x050WNF_L.png
<?php echo krogs_output_related_posts(); ?>
@johnbillion
johnbillion / wp_mail.md
Last active January 27, 2024 14:06
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@jonschr
jonschr / removeyoutuberelatedvideos
Created July 22, 2014 21:49
Remove related videos from youtube embeds (done via ooembed) in WordPress
//Remove related videos from youtube ooembed
add_filter('oembed_result', 'hide_youtube_related_videos', 10, 3);
function hide_youtube_related_videos($data, $url, $args = array()) {
$data = preg_replace('/(youtube\.com.*)(\?feature=oembed)(.*)/', '$1?' . apply_filters("hyrv_extra_querystring_parameters", "wmode=transparent&amp;") . 'rel=0$3', $data);
return $data;
}