Skip to content

Instantly share code, notes, and snippets.

hg commit

Dan Harper danharper

hg commit
Block or report user

Report or block danharper

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

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF


To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

danharper /
Last active Aug 29, 2015
how i feel css pre-processors should be: extending the language via namespaced (prefix) attributes & functions - NOT via @include stuff

In raw CSS:

.foo {
  background: -webkit-linear-gradient(red, green) left repeat;
  background: linear-gradient(red, green) left repeat;
  -webkit-transition: all 0.8s;
  -moz-transition: all 0.8s;
  transition: all 0.8s;
  color: green;
View gist:92b73264493bc41eee24

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at:

2. Install the Command Line Tools (CLT)

N="`readlink \"$1\"`"
mv -T "$1.stage" "$1"
ln -s "$N" "$1.stage"
rm -rf "$N"
cp -aH "$1" "$N"

Keybase proof

I hereby claim:

  • I am danharper on github.
  • I am danharper ( on keybase.
  • I have a public key whose fingerprint is 4EC0 F75A E4A4 CF06 0F41 BCB9 9596 CB4A 8D08 3A0A

To claim this, I am signing this object:

View a.php
// Version A: Facades everywhere - typical Laravel 4.2 style
// routes.php
Route::get('payments', 'BillingController@recentPayments');
// BillingController.php
class BillingController {
danharper / ffo.html
Created Oct 23, 2014
191 chars. Not selectable due to psuedo elements.
View ffo.html
<!doctype html>
title:before{content:"<!doctype html><title></title>";}
View down.php
$message = 'Temporary application maintenance in progress. Please try again shortly.';
if (isset($_SERVER['Content-Type']) && strpos($_SERVER['Content-Type'], 'json') !== false)
header('Content-Type', 'application/json');
echo json_encode(['error' => $message]);
danharper / Builder.php
Last active Aug 29, 2015
Simple Immutable Builder
View Builder.php
abstract class Builder {
abstract function build();
function __call($name, $arguments)
if ( ! property_exists($this, $name))
danharper /
Last active Aug 29, 2015
Small wrapper around Ionic's Keyboard plugin for Cordova; works in Browser (
define [], () ->
hasCordova = window.cordova?
class Keyboard
open: ->
if hasCordova
else 'would open Keyboard'
You can’t perform that action at this time.