Skip to content

Instantly share code, notes, and snippets.

Greg Boone gboone

Block or report user

Report or block gboone

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
View gist:588fb6d644e10cffc1e9

Features I wish GitHub for Mac had:

  • A view showing the folder structure
  • Ability to edit markdown files w/in application (or Atom integration)
  • Ability to send someone a link to a pull request to merge it
  • Ability to comment on pull requests/issues
  • Stash visualization
  • "Open in GitHub for Mac" makes almost no sense when it eventually opens in vim
  • Doesn't tell you about merge conflicts, just leaves them in the files.
gboone / pre-commit.imgoptim
Last active Aug 29, 2015
A commit hook to run imageoptim on all images in your assets/ directory
View pre-commit.imgoptim
# A pre-commit hook that runs Image Optim against all images in the /assets
# directory. Requires you have Image Optim installed and will fail silently if
# you don't have it installed to /Applications/. Image optim will skip any
# images already optimized but this may take time, especially if you've never
# run it before or have many images. Rename this pre-commit and move to your
# project's .git/hooks/ directory
# /Applications/ *.png
gboone / danger-alias
Created Mar 16, 2015
Dangerous git aliases
View danger-alias
alias.yolo="commit -am && git push -f"
View .vimrc
syntax on
set columns=80
set ruler
set wrapmargin=5
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
set backspace=2
gboone /
Created Nov 27, 2014
import requests
import os
url = ''
yourl = ''
yokey = os.environ['YO_KEY']
status = requests.get(url)
openclosed = status.json()['Icon']
if openclosed == u'Closed':, data={'api_token': yokey, 'username': 'YOMYOFFICECLOSED', 'link': status.json()['StatusWebPage']});
gboone / download_from_yml.rb
Created Nov 14, 2014
Download files from a yaml file
View download_from_yml.rb
# Where yaml file looks like:
# ---
# directory:
# - url
# directory2:
# - url
# ---
# Script will create the directories if they need creating
# and download the resource at each url into that directory

Keybase proof

I hereby claim:

  • I am gboone on github.
  • I am gboone ( on keybase.
  • I have a public key whose fingerprint is 0372 5539 C7B7 085F AD02 9FEE 7838 1DF8 B3E3 537A

To claim this, I am signing this object:

  • Will install a plugin from a url: wp plugin install --activate
  • GitHub will make a different zip file for every branch, tag, or even commit, observe!
  • Thus wp plugin install --activate will install and activate the plugin at that specific commit
gboone / maybe_flush.php
Last active Dec 21, 2015
Tired of hitting the Save Permalinks button every time you register a post type in WordPress? Try this function: it grabs the cached rewrite rules, checks for a target (could be anything, but let's say it's a post type with an archive) and flushes the rules if the rewrite rule isn't present.
View maybe_flush.php
function maybe_flush_rewrite_rules($target) {
$rules = get_option( 'rewrite_rules' );
if ( $rules[ $target . '/?$' ] != 'index.php?post_type=' . $target ) {
flush_rewrite_rules( $hard = true );
You can’t perform that action at this time.