Skip to content

Instantly share code, notes, and snippets.

View AliceWonderMiscreations's full-sized avatar

Alice Wonder AliceWonderMiscreations

  • Alice Wonder Miscreations
View GitHub Profile
#!/usr/bin/env php
<?php
// Creative Commons CC0 (equivalent of Public Domain)
// array of mailbox domains we know for sure are dane compliant
$DANEarray = array('deviant.email', 'domblogger.net', 'librelamp.com');
# load the json
$json = file_get_contents('./policy.json');
$data = json_decode($json);
@AliceWonderMiscreations
AliceWonderMiscreations / neuter_community_events.php
Last active May 23, 2018 14:36
Neuters the community events admin privacy leak in WordPress
<?php
/**
* Plugin Name: Neuter Community Events
* Plugin URI: https://gist.github.com/AliceWonderMiscreations/4a8e177f837ebe26c59a9766d626769f
* Description: Strips information from the WordPress community events request
* Version: 0.2
* Author: Alice Wonder Miscreations
* Author URI: https://notrackers.com
* License: MIT
*/
--- class-wp-community-events.php.orig 2018-05-09 14:36:12.923805278 +0000
+++ class-wp-community-events.php 2018-05-09 14:41:16.751253745 +0000
@@ -52,7 +52,7 @@
*/
public function __construct( $user_id, $user_location = false ) {
$this->user_id = absint( $user_id );
- $this->user_location = $user_location;
+ //$this->user_location = $user_location;
}
@AliceWonderMiscreations
AliceWonderMiscreations / wp-autoload.php
Last active May 23, 2018 14:51
A proposed PSR-4 autoloader for WordPress
<?php
/**
* Plugin Name: PSR-4 Autoloader
* Plugin URI: https://gist.github.com/AliceWonderMiscreations/4ba7209256f0e2b38d59a8787d164f63
* Description: Provides PSR-4 autoloading
* Version: 0.2
* Requires PHP: 5.6
* Author: AliceWonderMiscreations
* Author URI: https://notrackers.com/
* License: CC0
@AliceWonderMiscreations
AliceWonderMiscreations / twentyseventeen.patch
Created April 30, 2018 01:19
Patch for Twenty Seventeen
diff -ur twentyseventeen.orig/functions.php twentyseventeen/functions.php
--- twentyseventeen.orig/functions.php 2017-10-04 16:53:47.000000000 -0700
+++ twentyseventeen/functions.php 2018-04-29 18:06:54.026754406 -0700
@@ -255,6 +255,21 @@
}
add_action( 'template_redirect', 'twentyseventeen_content_width', 0 );
+// better way of doing it
+if (! function_exists('new_twentyseventeen_fonts_url')) :
+if (class_exists('\AWonderPHP\WebfontBuilder\AWMFontBuilder')) {
@AliceWonderMiscreations
AliceWonderMiscreations / twentysixteen.patch
Created April 30, 2018 00:41
Patch for Twenty Sixteen
diff -ur twentysixteen.orig/functions.php twentysixteen/functions.php
--- twentysixteen.orig/functions.php 2017-10-04 16:53:47.000000000 -0700
+++ twentysixteen/functions.php 2018-04-29 17:29:33.238198764 -0700
@@ -184,6 +184,28 @@
}
add_action( 'widgets_init', 'twentysixteen_widgets_init' );
+// better way of doing it
+if (! function_exists('new_twentysixteen_fonts_url')) :
+if (class_exists('\AWonderPHP\WebfontBuilder\AWMFontBuilder')) {
@AliceWonderMiscreations
AliceWonderMiscreations / twentyfifteen.patch
Created April 29, 2018 23:27
Patch for Twenty Fifteen theme to use AWMFontBuilder
diff -ur twentyfifteen.orig/functions.php twentyfifteen/functions.php
--- twentyfifteen.orig/functions.php 2017-10-04 16:53:47.000000000 -0700
+++ twentyfifteen/functions.php 2018-04-29 14:05:16.943095114 -0700
@@ -168,6 +168,41 @@
}
add_action( 'widgets_init', 'twentyfifteen_widgets_init' );
+// better way of doing it
+if (! function_exists('new_twentyfifteen_fonts_url')) :
+if (class_exists('\AWonderPHP\WebfontBuilder\AWMFontBuilder')) {
@AliceWonderMiscreations
AliceWonderMiscreations / AWMFontBuilder.php
Last active April 29, 2018 15:14
A Google Font generator that allows use of a mirror
<?php
declare(strict_types=1);
/**
* Plugin Name: AWM Google Font Builder
* Plugin URI: https://gist.github.com/AliceWonderMiscreations/b0071e48a27a536142ce38bf6868336b
* Description: Provides a class theme developers can use to build a Google
* Webfont URI
* Version: 0.82
* Requires PHP: 7.0
@AliceWonderMiscreations
AliceWonderMiscreations / awm-rta-label.php
Last active April 25, 2018 20:08
Basic WP plugin to send RTA (Restricted To Adults) voluntary content label
<?php
declare(strict_types=1);
/**
* Plugin Name: AWM RTA Label
* Plugin URI: https://gist.github.com/AliceWonderMiscreations/e65bb21f0d6c9c6842f0a535837077ec
* Description: Globally enables RTA Label on a WordPress Blog. Enable this plugin, and it is done. Disable plugin to undo.
* Version: 2112
* Author: Alice Wonder Miscreations
* Author URI: https://github.com/AliceWonderMiscreations/
#!/bin/bash
# RSA 3072-bit
# Tested - works for me. Line number notes assume first line is line 1
# Modify lines 85-88, 90 for your own identity (leave ${FQDN} line alone)
# Modify line 19 for your openssl/libressl binary path
# Modify line 20 for your certbot path