Skip to content

Instantly share code, notes, and snippets.

Brad Parbs bradp

Block or report user

Report or block bradp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bradp / global-post-exclusion.php
Last active Aug 17, 2016
Filters queries to exclude posts that already exist on a page. Call `wds_add_to_global_exclusions( $post_id )` to add to the list.
View global-post-exclusion.php
* Plugin Name: Global Post Exclusion
* Description: Uses global variables to store post IDs and remove them from other queries.
* Filters queries on pre_get_posts to exclude posts that are excluded.
* @param object $query current WP Query

Keybase proof

I hereby claim:

  • I am bradp on github.
  • I am bradp ( on keybase.
  • I have a public key whose fingerprint is 3A29 7822 EE98 D87E 6EC2 3AF2 3695 0755 BD72 93B3

To claim this, I am signing this object:

bradp / say
Last active Sep 17, 2015
View say
View instructions.txt
1. Install Custom CSS plugin (
2. Add this css:
#wp-realtime-sitemap-pages ul:first-child {
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3;
bradp / gist:8b379e71daa4b6a61d14
Last active May 19, 2020
Useful SQL Queries
View gist:8b379e71daa4b6a61d14
#Get the size of each table, ordered by largest to smallest
SELECT table_name AS "Tables",
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES
WHERE table_schema = "YOU+TABLE+NAME+HERE"
ORDER BY (data_length + index_length) DESC;
#Get the size of the entire DB
SELECT table_schema "DB Name",
Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
View gist:a1f8893f4a29e447f2d2
"follow_symlinks": true,
"name": "my-theme",
"path": "htdocs/wp-content/themes/my-theme-name"
"follow_symlinks": true,
bradp /
Last active May 15, 2020
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo " \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
View brad-muse.zsh-theme
#!/usr/bin/env zsh
#local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
setopt promptsubst
autoload -U add-zsh-hook
bradp / gist:2e71455f9795fb2e6b2d
Last active Oct 6, 2015
Nginx + HHVM Configuration
View gist:2e71455f9795fb2e6b2d
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
View Preferences.sublime-settings
You can’t perform that action at this time.