This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| class Api::RegistrationsController < Api::BaseController | |
| respond_to :json | |
| def create | |
| user = User.new(params[:user]) | |
| if user.save | |
| render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
| return | |
| else |
| { | |
| "AL": "Alabama", | |
| "AK": "Alaska", | |
| "AS": "American Samoa", | |
| "AZ": "Arizona", | |
| "AR": "Arkansas", | |
| "CA": "California", | |
| "CO": "Colorado", | |
| "CT": "Connecticut", | |
| "DE": "Delaware", |
| // | |
| // UIView+DEFrameAdditions.h | |
| // | |
| // Copyright (c) 2011-2013 Double Encore, Inc. All rights reserved. | |
| // | |
| // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
| // Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
| // Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer | |
| // in the documentation and/or other materials provided with the distribution. Neither the name of the Double Encore Inc. nor the names of its | |
| // contributors may be used to endorse or promote products derived from this software without specific prior written permission. |
There are many (old) clients available:
The Google Analytics API is at v3 (at time of writing).
This example uses Google's Ruby API client to access Analytics. Use https://github.com/google/google-api-ruby-client (Google supported).
| @implementation UITextView (RSExtras) | |
| static BOOL stringCharacterIsAllowedAsPartOfLink(NSString *s) { | |
| /*[s length] is assumed to be 0 or 1. s may be nil. | |
| Totally not a strict check.*/ | |
| if (s == nil || [s length] < 1) | |
| return NO; |
| import Foundation | |
| extension String | |
| { | |
| var length: Int { | |
| get { | |
| return countElements(self) | |
| } | |
| } | |
| b2d(){ | |
| boot2docker $1; | |
| } | |
| b2d poweroff | |
| b2d delete | |
| b2d init | |
| b2d up |