Skip to content

Instantly share code, notes, and snippets.

View glennansley's full-sized avatar

Glenn Ansley glennansley

  • iThemes
  • Wake Forest, North Carolina
View GitHub Profile
@glennansley
glennansley / kebase.md
Created September 23, 2014 00:35
keybase.md

Keybase proof

I hereby claim:

  • I am glennansley on github.
  • I am glennansley (https://keybase.io/glennansley) on keybase.
  • I have a public key whose fingerprint is 8D66 5AA7 D3EE D6D6 E268 1FEC 10B2 7E90 D122 D1D4

To claim this, I am signing this object:

@glennansley
glennansley / gist:5310749
Created April 4, 2013 14:21
Disable access to WordPress DB upgrade script unless user has permission to upgrade core. Place this at the bottom of wp-config.php
/** Restrict access to the DB upgrade script **/
if ( 'upgrade.php' == $pagenow ) {
if ( ! current_user_can( 'update_core' ) ) {
$url = is_user_logged_in() ? get_admin_url() : add_query_arg( array( 'redirect_to' => get_home_url() . '/wp-admin/upgrade.php' ), get_admin_url() );
wp_safe_redirect( $url );
die();
}
}
@glennansley
glennansley / git-resources.txt
Created November 8, 2011 13:00
Helpful Git Resources
These are some helpful Git resources that I found while climbing the learning curve.
Feel free to append / modify
=======================
== UNDERSTANDING GIT ==
=======================
* The Git Parable
- http://tom.preston-werner.com/2009/05/19/the-git-parable.html
- "Read this parable all the way through and you should have very little trouble mastering the various Git commands and wielding the awesome power that Git makes available to you."