Skip to content

Instantly share code, notes, and snippets.

View davidwolfpaw's full-sized avatar

david wolfpaw davidwolfpaw

View GitHub Profile
@watchfulness
watchfulness / slaanesh.md
Last active January 2, 2026 23:14
Slaanesh

Please note that this document is in the process of being worked on, and edits may occur. These edits do not constitute any kind of scheme or disinformation on our part; they are simply the natural outcome of a living document.

The TL;DR for folks who don't want to read about the process:

Confirmation

Amelia asked Slaanesh, after this document was initially posted, and received confirmation that Slaanesh had been lying about who she was. Amelia posted screenshots showing this, which can be seen in this archive (also available here).

@sneakers-the-rat
sneakers-the-rat / clean_pdf.sh
Last active October 18, 2025 18:03
Strip PDF Metadata
# --------------------------------------------------------------------
# Recursively find pdfs from the directory given as the first argument,
# otherwise search the current directory.
# Use exiftool and qpdf (both must be installed and locatable on $PATH)
# to strip all top-level metadata from PDFs.
#
# Note - This only removes file-level metadata, not any metadata
# in embedded images, etc.
#
# Code is provided as-is, I take no responsibility for its use,
@davewarfel
davewarfel / default-wordpress-blocks-sass.scss
Last active November 8, 2023 11:31
WordPress Blocks Styles - Cleaned Up, Commented & Sassified
/**
* WordPress Blocks
*
* Default block styling included with WordPress core.
* Provides a better starting point for WordPress theme developers,
* especially when using Sass.
*
* @link https://github.com/WordPress/WordPress/blob/master/wp-includes/css/dist/block-library/style.css
*
* Most styles from the above file are included.
@pento
pento / php-block.js
Last active January 20, 2026 00:20
Converting a shortcode to a block: this method is fast to do, but a mediocre UX. You should only use this as a stopgap until you can implement a full block UI.
// License: GPLv2+
var el = wp.element.createElement,
registerBlockType = wp.blocks.registerBlockType,
ServerSideRender = wp.components.ServerSideRender,
TextControl = wp.components.TextControl,
InspectorControls = wp.editor.InspectorControls;
/*
* Here's where we register the block in JavaScript.
@RadGH
RadGH / wordpress-tinymce.js
Last active October 21, 2022 01:21
Get/Set content of a TinyMCE visual or text editor with JavaScript
/*
Based on: http://wordpress.stackexchange.com/questions/42652/#answer-42729
These functions provide a simple way to interact with TinyMCE (wp_editor) visual editor.
This is the same thing that WordPress does, but a tad more intuitive.
Additionally, this works for any editor - not just the "content" editor.
Usage:
#!/bin/bash
show_usage () {
echo "Usage: `basename $0` [START [END]]"
echo
echo "Steps through the commit history from START to END,"
echo "then returns to the branch or commit from before execution."
echo
echo "START defaults to the root commit (beginning of history)."
echo "END defaults to current branch/commit."