Skip to content

Instantly share code, notes, and snippets.

View morganestes's full-sized avatar

Morgan Estes morganestes

View GitHub Profile
@morganestes
morganestes / !what.md
Last active August 29, 2015 13:59
Fun SPAM emails I receive

I get quite a bit of spam, even though my host has a filter installed. These are some of the better ones that get through.

#!/bin/bash
#
# Get a list of props from the log and search for a given name.
#
# Example: add `getprops <name>` to the end of this file and run
# `$ ./propslog.sh` from the command line.
#
# You can also add this to your ~/.functions file and use
# `getprops <name>` inside your local WordPress Core repo.
#

Keybase proof

I hereby claim:

  • I am morganestes on github.
  • I am morganestes (https://keybase.io/morganestes) on keybase.
  • I have a public key whose fingerprint is FEC6 4E0B 7773 7647 FA0C 5B34 BB57 9336 DD3E FAB9

To claim this, I am signing this object:

@morganestes
morganestes / adb-tools.sh
Created June 10, 2014 21:23
Android command-line tools for OS X.
# Android helpers
alias phonescreencap="adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png"
# Creates a full backup using adb.
function phonebackup(){
local timestamp=$(date "+%Y%m%dT%H%M%S")
local phoneserial=$(adb get-serialno)
adb backup -apk -shared -all -f "${HOME}/temp/villebackup/${phoneserial}-backup-${timestamp}.ab"
}
<?php
/*
Plugin Name: Golf Tailor Offers
Plugin URI: http://code.golftailor.com/
Description: Create an Offers Custom Post Type for use in sales pages.
Version: 0.1.0
Author: morganestes
Author URI: http://www.golftailor.com
Text Domain: golftailor
*/
<!DOCTYPE html>
<!--[if IE 6]>
<html itemscope itemtype="http://schema.org/Article" id="ie6" lang="en-US" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#" itemscope itemtype="http://schema.org/WebPage" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:addthis="http://www.addthis.com/help/api-spec" >
<![endif]-->
<!--[if IE 7]>
<html itemscope itemtype="http://schema.org/Article" id="ie7" lang="en-US" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#" itemscope itemtype="http://schema.org/WebPage" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:addthis="http://www.addthis.com/help/api-spec" >
<![endif]-->
<!--[if IE 8]>
<html itemscope itemtype="http://schema.org/Article" id="ie8" lang="en-US" prefix="og: http://ogp.me/ns
@morganestes
morganestes / xylitol.html
Created August 6, 2014 20:11
xylitol exploit page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>Cyber-doigt : 30,403 victimes par Xylitol</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Description" content="Vous aussi, comme Xylitol envoyez et recevez des Cyber-doigts dans le c** rien que pour rire..." />
<meta name="Keywords" content="cyber doigt, doigt, cyberdoigt, Xylitol, humour, blague, rire, rigoler, amis" />
<meta name="robots" content="noindex, follow">
<meta http-equiv="Content-Language" content="fr" />
<link href="/css/cyberdoigt.css" rel="stylesheet" type="text/css" />
@morganestes
morganestes / wp-beta-setup.sh
Last active May 15, 2017 07:56
Set up a WordPress site for beta testing with wp-cli.
#!/usr/bin/env sh
# Install the Beta Tester plugin and set it to "Bleeding Edge" releases.
# Note: after installing plugin and setting the option, you may need to visit
# the site once before updating core version.
wp-beta() {
wp plugin install wordpress-beta-tester --activate
wp option set wp_beta_tester_stream unstable
wp core update
@morganestes
morganestes / ghio.sh
Last active August 29, 2015 14:11
Bash script to shorten a GitHub link using Git.io
#!/usr/bin/env bash
echo `curl -s -i http://git.io -F "url=$1" | tr -d '\r' | sed -En 's/^Location: (.*)/\1/p'`
@morganestes
morganestes / wp_admin_filtered_url.md
Last active August 29, 2015 14:16
WP Trac #23367 testing

Results of various return values compared to HTML output

return get_admin_url() . remove_query_arg( $removable_url_params );

<link id="wp-admin-canonical" rel="canonical" href="http://src.wordpress-develop.dev/wp-admin//wp-admin/plugins.php?plugin_status=all&amp;paged=1&amp;s">

return get_site_url() . remove_query_arg( $removable_url_params );

<link id="wp-admin-canonical" rel="canonical" href="http://src.wordpress-develop.dev/wp-admin/plugins.php?plugin_status=all&amp;paged=1&amp;s">