Skip to content

Instantly share code, notes, and snippets.

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

Instructions

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

@danharper
danharper / ex.md
Last active August 29, 2015 14:00
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;

OS X 10.10 Guide

Here's what I did to get things working.

1. Install Xcode 6

Yep, over at: https://developer.apple.com

2. Install the Command Line Tools (CLT)

#!/bin/sh
# deploy.sh
N="`readlink \"$1\"`"
mv -T "$1.stage" "$1"
ln -s "$N" "$1.stage"
rm -rf "$N"
cp -aH "$1" "$N"
@danharper
danharper / keybase.md
Created September 23, 2014 20:36
keybase.md

Keybase proof

I hereby claim:

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

<?php
// Version A: Facades everywhere - typical Laravel 4.2 style
// routes.php
Route::get('payments', 'BillingController@recentPayments');
// BillingController.php
class BillingController {
@danharper
danharper / ffo.html
Created October 23, 2014 19:38
191 chars. Not selectable due to psuedo elements.
<!doctype html>
<title></title>
<style>
*{display:block;}
title:before{content:"<!doctype html><title></title>";}
style:before{content:"<style>";}
style:after{content:"\3C/style>";}
</style>
@danharper
danharper / down.php
Created January 22, 2015 13:55
downtime
<?php
http_response_code(503);
$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
danharper / Builder.php
Last active August 29, 2015 14:14
Simple Immutable Builder
<?php
abstract class Builder {
abstract function build();
function __call($name, $arguments)
{
if ( ! property_exists($this, $name))
{
@danharper
danharper / keyboard.coffee
Last active August 29, 2015 14:15
Small wrapper around Ionic's Keyboard plugin for Cordova; works in Browser (https://github.com/driftyco/ionic-plugins-keyboard)
define [], () ->
hasCordova = window.cordova?
class Keyboard
open: ->
if hasCordova
cordova.plugins.Keyboard.show()
else
console.info 'would open Keyboard'