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 wp-cli-notes.md
  • Will install a plugin from a url: wp plugin install https://github.com/gboone/simple-open-graph/archive/master.zip --activate
  • GitHub will make a different zip file for every branch, tag, or even commit, observe! https://github.com/gboone/open-graph-control/archive/4c4611a9c35f269d5d5dab7b6a8fc6697e0a5341.zip
  • Thus wp plugin install https://github.com/gboone/open-graph-control/archive/4c4611a9c35f269d5d5dab7b6a8fc6697e0a5341.zip --activate will install and activate the plugin at that specific commit
View keybase.md

Keybase proof

I hereby claim:

  • I am gboone on github.
  • I am gboone (https://keybase.io/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:

@gboone
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
@gboone
gboone / yomyoffice.py
Created Nov 27, 2014
YOMYOFFICECLOSED
View yomyoffice.py
import requests
import os
url = 'http://www.opm.gov/json/operatingstatus.json'
yourl = 'https://api.justyo.co/yoall/'
yokey = os.environ['YO_KEY']
status = requests.get(url)
openclosed = status.json()['Icon']
if openclosed == u'Closed':
requests.post(yourl, data={'api_token': yokey, 'username': 'YOMYOFFICECLOSED', 'link': status.json()['StatusWebPage']});
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
gboone / danger-alias
Created Mar 16, 2015
Dangerous git aliases
View danger-alias
alias.yolo="commit -am && git push -f"
@gboone
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
#!/bin/sh
#
# 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/ImageOptim.app/Contents/MacOS/ImageOptim *.png
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
gboone / draft-format
Created May 11, 2015
18F Blog Draft format
View draft-format
## Audience:
## Goal of the Post:
## Imagery ideas:
## Description:
## Who needs to clear?
@gboone
gboone / gist:4f4dee1290278b483e24
Created Jun 8, 2015
Turn "authors" attached to blog posts into a _data file
View gist:4f4dee1290278b483e24
#! /usr/bin/ruby
require 'jekyll'
config = Jekyll.configuration
source = config['source']
data_source = File.join(source, config['data_source'])
posts = File.join(source, '_posts')
authors = []
if ARGV[0].nil?
puts "No value passed for filename, assuming 'author.'"
file_name = 'author'
You can’t perform that action at this time.