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:
| $ = jQuery | |
| $.fn.lineHeight or= -> | |
| if height = @data('lineHeight') | |
| return height | |
| # Create a hidden div with the same font | |
| # properties, then measure its height | |
| $shadow = $('<span />') | |
| $shadow.css({ |
| require 'test_helper' | |
| class ARFactory | |
| def self.new(table_name) | |
| Class.new(ActiveRecord::Base) do | |
| self.table_name = table_name | |
| end | |
| end | |
| end |
| require 'active_record' | |
| require 'fileutils' | |
| namespace :db do | |
| desc "loads database configuration in for other tasks to run" | |
| task :load_config do | |
| ActiveRecord::Base.configurations = db_conf | |
| ActiveRecord::Base.establish_connection db_conf | |
| end |
| App.AccountEditRoute = Ember.Route.extend({ | |
| setupController: function(controller) { | |
| controller.set('content', this.get('currentUser')); | |
| } | |
| }); |
| module YourApp | |
| class Application < Rails::Application | |
| # ... | |
| config.middleware.insert_before "Rack::Cache", "SubdomainRedirect" | |
| # ... | |
| end | |
| end |
| /** | |
| * Create a web friendly URL slug from a string. | |
| * | |
| * Requires XRegExp (http://xregexp.com) with unicode add-ons for UTF-8 support. | |
| * | |
| * Although supported, transliteration is discouraged because | |
| * 1) most web browsers support UTF-8 characters in URLs | |
| * 2) transliteration causes a loss of information | |
| * | |
| * @author Sean Murphy <sean@iamseanmurphy.com> |
| require "rubygems" | |
| require 'sinatra' | |
| require "aws/s3" | |
| get '/' do | |
| return %Q{ | |
| <form action="upload" method="post" accept-charset="utf-8" enctype="multipart/form-data"> | |
| <div> | |
| <input type="file" name="file" value="" id="file"> | |
| </div> |
| 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 |
| How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS | |
| Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing). | |
| The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here: | |
| * Heroku Hostname SSL | |
| * GoDaddy Standard SSL Certificate | |
| * Zerigo DNS |