Skip to content

Instantly share code, notes, and snippets.

View eriktdesign's full-sized avatar

Erik Teichmann eriktdesign

View GitHub Profile
@ideadude
ideadude / wordpress_colon_searches.php
Last active January 23, 2024 02:58
If a colon is in a user search query in the WP Users dashboard or the PMPro Members List, try to speed up the query.
<?php
/**
* Functions affecting admins and the admin dashboard.
*/
/**
* Return array of fields found in the wp_users table.
* This function used in the others below to determine if a key entered in a search like "email:[email protected]"
* is referencing the user_email column of the wp_users table or a unique meta key.
*/
function my_pmpro_get_user_table_columns() {
@ryanshoover
ryanshoover / .gitignores-__default
Last active January 16, 2020 21:44
CircleCI deploy script to WP Engine
# Ignore everything in the root except the "wp-content" directory.
/*
!.git*
!wp-content/
!circle.yml
!composer.json
!auth.json
!package.json
!Gruntfile.js
@technosailor
technosailor / update-mysql56.sh
Created February 24, 2016 19:05
Updates VVV MySQL 5.5 to 5.6 -- Ubuntu 14.04
#!/bin/bash
# Usage: ./update-mysql56.sh
# Backup of all databases... JUST IN CASE
mysqldump --all-databases --single-transaction --events --user=root --password > ~/all_database_backup.sql
# Remove MySQL 5.5
sudo apt-get remove mysql-server
sudo apt-get autoremove
@forgeandsmith
forgeandsmith / Gravity Forms Reset Styles
Last active June 22, 2021 07:33
Gravity Forms SCSS reset styles for easy style editing and management
///////////////////////////////////////////////
////// GRAVITY FORMS RESET STYLES //////
///////////////////////////////////////////////
// These styles are made in mind to be used with SCSS or LESS
// If you use these styles, you must go to the Gravity Forms settings in the WordPress back end and set Output CSS to No.
////----- Core Containers
.gform_heading,
.gform_body,
@wokamoto
wokamoto / user_meta_transient.php
Last active July 17, 2023 11:53
[WordPress] user_meta transient
<?php
/**
* Delete a user meta transient.
*/
function delete_user_meta_transient( $user_id, $transient ) {
global $_wp_using_ext_object_cache;
$user_id = (int) $user_id;
do_action( 'delete_user_meta_transient_' . $transient, $user_id, $transient );
@gka
gka / _readme.md
Created January 24, 2013 20:43
PHP Endpoint for Github Webhook URLs

PHP Endpoint for Github Webhook URLs

If you love deploying websites using Github, but for some reason want to use your own server, this script might be exactly what you need.

  1. Put github.php somewhere on your PHP-enabled web server, and make it accessible for the outside world. Let's say for now the script lives on http://example.com/github.php