Skip to content

Instantly share code, notes, and snippets.

View jbraithwaite's full-sized avatar

Justin Braithwaite jbraithwaite

View GitHub Profile
@jbraithwaite
jbraithwaite / shipitfile.js
Created August 28, 2015 07:27
Shipit deploy with Slack integration
var pack = require('./package.json');
var request = require('request');
var name = pack.name;
module.exports = function (shipit) {
require('shipit-deploy')(shipit);
var deployTo = '/var/www/FOLDER_TO_DEPLOY_TO';
var deployToCurrent = deployTo + '/current';
var slackWebhookURL = 'SLACK_HOOK_URL';
@jbraithwaite
jbraithwaite / memcached-status-page.md
Last active August 3, 2018 12:33
Memcached Status page in PHP

Screenshot

@jbraithwaite
jbraithwaite / ControlledRouter.js
Last active October 19, 2016 01:22 — forked from gaelollivier/ControlledRouter.js
React Router v4 ControlledRouter
// Code taken from:
// https://gist.github.com/gaelduplessix/050e5cce31f9fabb1030f4ba47663db5
// gaelduplessix/ControlledRouter.js
import React, { Component } from 'react'
import BrowserHistory from 'react-history/BrowserHistory'
import { Push } from 'react-history'
import { StaticRouter } from 'react-router'
class RouterWrapper extends Component {
@jbraithwaite
jbraithwaite / gist:7572936
Created November 20, 2013 23:12
nginx configuration for feedpress.it with ghost
location /rss {
# If the UA doesn't contain feedpress or feedvalidator
if ($http_user_agent !~* (feedpress)|(feedvalidator)){
# Redirect the user to your cname'd rss veed link
return 301 http://feed.YOUR_SITE.com/YOUR_FEED_NAME;
# If you haven't set that up (you should), you can uncomment out the following line
# return 302 http://feedpress.me/YOUR_FEED_NAME;
<snippet>
<content><![CDATA[
https://placehold.it/${1:width}x${2:hight}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>place</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
@jbraithwaite
jbraithwaite / org.php.php-fpm.plist
Created May 16, 2014 19:56
Launch Agent for PHP-FPM on OS X
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>org.php.php-fpm</string>

Keybase proof

I hereby claim:

  • I am jbraithwaite on github.
  • I am jbraithwaite (https://keybase.io/jbraithwaite) on keybase.
  • I have a public key whose fingerprint is 7CC3 7170 CB45 25B6 BD0F C3CD FD83 2958 903D 59A7

To claim this, I am signing this object: