Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
curl --user-agent "Googlebot/2.1 (+http://www.google.com/bot.html)" -v $@ | |
require 'xcodeproj' | |
# Based on: http://blog.seiji.me/2012/02/10/create-xcodeproj-using-xcode-project/ | |
# example usage | |
# project.add_system_framework("Foundation.framework") | |
# project.add_system_framework("libxml2.dylib") | |
module Xcodeproj | |
class Project | |
def add_system_framework(fname) |
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
var width = 500, | |
height = 70, | |
font = '18px serif' | |
function getRetinaRatio() { | |
var devicePixelRatio = window.devicePixelRatio || 1 | |
var c = document.createElement('canvas').getContext('2d') | |
var backingStoreRatio = [ | |
c.webkitBackingStorePixelRatio, | |
c.mozBackingStorePixelRatio, |
#!/usr/bin/env xcrun swift | |
import Foundation | |
let kDelayUSec : useconds_t = 500_000 | |
func DragMouse(from p0: CGPoint, to p1: CGPoint) { | |
let mouseDown = CGEventCreateMouseEvent(nil, .LeftMouseDown, p0, .Left) | |
let mouseDrag = CGEventCreateMouseEvent(nil, .LeftMouseDragged, p1, .Left) | |
let mouseUp = CGEventCreateMouseEvent(nil, .LeftMouseUp, p1, .Left) |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Apple Meta Insanity</title> | |
<!-- | |
APPLE WEB APP META TAGS | |
--> | |
// | |
// Extensions.swift | |
// WordSnatch | |
// | |
// Created by Craig on 24/03/2015. | |
// Copyright (c) 2015 Interactive Coconut. All rights reserved. | |
// | |
import SpriteKit | |
import UIKit |
extension NSUserDefaults { | |
func colorForKey(key: String) -> UIColor? { | |
var color: UIColor? | |
if let colorData = dataForKey(key) { | |
color = NSKeyedUnarchiver.unarchiveObjectWithData(colorData) as? UIColor | |
} | |
return color | |
} |