Skip to content

Instantly share code, notes, and snippets.

Always interested

Frank Bültge bueltge

Always interested
View GitHub Profile
wdullaer /
Last active Aug 11, 2022
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp:// --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb docker main > /etc/apt/sources.list.d/docker.list"
johnbillion / hierarchy.php
Last active Aug 7, 2022
ASCII WordPress Template Hierarchy
View hierarchy.php
WordPress Theme Template Hierarchy Last updated for WordPress 5.4
This diagram is partially simplified for legibility. To view the complete template hierarchy in use on your site see the
Template panel in the Query Monitor plugin.
kasparsd /
Last active Aug 7, 2022
Using Git with Subversion Mirroring for WordPress Plugin Development
View wp-query-ref.php
// This gist is now maintained on github at
* WordPress Query Comprehensive Reference
* Compiled by luetkemj -
* Source:
View gist:4fa3c4228a8bb53cc71d
load wp-config.php
set up default constants
load wp-content/advanced-cache.php if it exists
load wp-content/db.php if it exists
connect to mysql, select db
load object cache (object-cache.php if it exists, or wp-include/cache.php if not)
load wp-content/sunrise.php if it exists (multisite only)
tommcfarlin / meta-data-serialization.php
Last active Jul 28, 2022
An example function used to demonstrate how meta data is typically saved in a WordPress theme or plugin. The gist is made public so that developers can contribute to the standard security boilerplate functionality in order to simplify, reduce, and improve our serialization functions.
View meta-data-serialization.php
* An example function used to demonstrate how to use the `user_can_save` function
* that provides boilerplate security checks when saving custom post meta data.
* The ultimate goal is provide a simple helper function to be used in themes and
* plugins without the need to use a set of complex conditionals and constants.
* Instead, the aim is to have a simplified function that's easy to read and that uses
* WordPress APIs.
View instrument-hooks.php
Plugin Name: Instrument Hooks for WordPress
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook.
Version: 0.1
Author: Mike Schinkel
Author URI:
if (isset($_GET['instrument']) && $_GET['instrument']=='hooks') {
ziadoz /
Last active Jul 25, 2022
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
kovshenin / image-shortcode.php
Created Mar 6, 2012
Image shortcode for WordPress
View image-shortcode.php
* Image shortcode callback
* Enables the [kovshenin_image] shortcode, pseudo-TimThumb but creates resized and cropped image files
* from existing media library entries. Usage:
* [kovshenin_image src="" width="100" height="100"]
* @uses image_make_intermediate_size
hakre / dl-file.php
Created Jan 2, 2012
Wordpress login to download uploaded files
View dl-file.php
* dl-file.php
* Protect uploaded files with login.
* @link
* @author hakre <>
* @license GPL-3.0+