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:
| if [ -f "$rvm_path/scripts/rvm" ]; then | |
| source "$rvm_path/scripts/rvm" | |
| if [ -f ".rvmrc" ]; then | |
| source ".rvmrc" | |
| fi | |
| if [ -f ".ruby-version" ]; then | |
| rvm use `cat .ruby-version` | |
| fi |
| # ... | |
| gem 'sidekiq' | |
| gem 'slim' | |
| # ... |
| # ... | |
| gem 'sidekiq' | |
| # ... |
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |
| #!/bin/bash | |
| # from | |
| # http://bergamini.org/computers/creating-favicon.ico-icon-files-with-imagemagick-convert.html | |
| convert source-WxW.png -resize 256x256 -transparent white favicon-256.png | |
| convert favicon-256.png -resize 16x16 favicon-16.png | |
| convert favicon-256.png -resize 32x32 favicon-32.png | |
| convert favicon-256.png -resize 64x64 favicon-64.png | |
| convert favicon-256.png -resize 128x128 favicon-128.png |
| # in features/support/env.rb | |
| require 'selenium/webdriver' | |
| # we need a firefox extension to start intercepting javascript errors before the page | |
| # scripts load | |
| Capybara.register_driver :selenium do |app| | |
| profile = Selenium::WebDriver::Firefox::Profile.new | |
| # see https://github.com/mguillem/JSErrorCollector | |
| profile.add_extension File.join(Rails.root, "features/support/extensions/JSErrorCollector.xpi") | |
| Capybara::Selenium::Driver.new app, :profile => profile |
| 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 |
| #!/usr/bin/env python | |
| """Command line script to convert a file, usually an image, into a data URI | |
| for use on the web.""" | |
| import base64 | |
| import mimetypes | |
| import os | |
| import sys | |
| %!TEX TS-program = xelatex | |
| \documentclass[12pt]{scrartcl} | |
| % The declaration of the document class: | |
| % The second line here, i.e. | |
| % \documentclass[12pt]{scrartcl} | |
| % is a standard LaTeX document class declaration: | |
| % we say what kind of document we are making in curly brackets, | |
| % and specify any options in square brackets. |