Skip to content

Instantly share code, notes, and snippets.

Avatar

J Webb webbj74

View GitHub Profile
@webbj74
webbj74 / getnarrative.php
Created Sep 28, 2016
Sample Narrative API Client
View getnarrative.php
#!/usr/bin/env php
<?php
// Make sure this file is executable (chmod +x getnarrative.php)
// Run as:
// $ ./getnarrative.php <bearerToken>
//
// See: https://github.com/NarrativeOP/python_oauth2_token for method to fetch token
if (empty($argv[1])) {
View frontmatter.md

title: This is my title created: 20160806152645348 modified: 20160806152717955 tags: multi-line-field: | line1 line2 complex-field: - line1

@webbj74
webbj74 / phpenv-osx.sh
Last active Sep 6, 2017
Setup multiple versions of PHP on OSX using homebrew
View phpenv-osx.sh
#!/usr/bin/env bash
# Use this script to install or re-install multiple versions of PHP
# You should be able to re-run the script multiple times; it will update/reinstall what it needs.
# Check OS
if [ "${OSTYPE//[0-9.]/}" != "darwin" ]; then
echo "This script is intended for OSX users."
exit
View keybase.md

Keybase proof

I hereby claim:

  • I am webbj74 on github.
  • I am webbj (https://keybase.io/webbj) on keybase.
  • I have a public key whose fingerprint is C608 45C9 8B36 489B BBA8 7CF7 3072 3AF4 B048 09F9

To claim this, I am signing this object:

View email-me.xml
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say voice="man" language="en">Hello and welcome to the twenty first century. I no longer accept phone calls. Please email me.</Say>
<Pause length="1"/>
<Say voice="woman" language="en">Let me repeat that. I no longer accept phone calls. Please email me.</Say>
<Pause length="1"/>
<Say voice="alice" language="en-US">Message 1 0 2</Say>
</Response>
@webbj74
webbj74 / init-org.el
Created Sep 22, 2015
org-mode file+function capture template example
View init-org.el
;; I am not a regular emacs user and haven't played with lisp for many years.
;; I struggled for a couple of days trying to tweak org-capture-templates to
;; get my desired behavior for journal entries. I hope this helps someone!
;;
;; I have been following the excellent guide http://doc.norang.ca/org-mode.html
;; The "journal" template was the one I wanted to tweak. I use a date-based
;; journal filename, e.g. "2015-09-22-Journal-Entry.org". The contents of the
;; file consist of a top-level headline with a human-friendly date, followed
;; by second-level headline with the time and brief journal note. For example:
;;
View .gitconfig
[user]
name = Your Name
email = your.name@example.com
[core]
pager = /usr/bin/less -+$LESS -FRX
excludesfile = ~/.gitignore-global
editor = vim
[color]
@webbj74
webbj74 / behat.yml
Last active Aug 29, 2015
Alter the curl timeout when using behat and goutte
View behat.yml
# Problem:
#
# Behat tests fail with messages like:
# [curl] 28: Operation timed out after 30096 milliseconds with 0 bytes received
#
# Reason:
#
# By default, goutte sets CURLOPT_TIMEOUT to 30 seconds
#
# Solution:
@webbj74
webbj74 / name.webbj74
Created Jun 13, 2014
OSX Packet Filter Rules for using privateinternetaccess.com VPN
View name.webbj74
#
# OSX packet filter rules
# References:
# * https://gist.github.com/scy/8122924
#
# The purpose of this config is to make sure that my system uses the
# privateInternetAccess VPN connection for everything and not to communicate
# unencrypted when the VPN connection goes down. Therefore, I block
# everything on the physical interfaces except for ICMP, DHCP, DNS and the
@webbj74
webbj74 / webbj74.pp
Last active Jan 2, 2016
Personal Boxen manifest
View webbj74.pp
# Personal Boxen Manifest
# File: /opt/boxen/repo/modules/people/manifests/webbj74.pp
#
# Requires the following added to Puppetfile:
#
# github "adium", "1.3.0"
# github "autoconf", "1.0.0"
# github "chrome", "1.1.2"
# github "fitbit", "1.0.0.9.1", :repo => "webbj74/puppet-fitbit"
# github "iterm2", "1.0.4"
You can’t perform that action at this time.