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:
| # Precondition: Git for Windows 2.9.0 + Windows 7, other version of Git for Windows & Windows XP and Windows 10 should also be supported | |
| # In /etc/ssh/sshd_config, set UsePrivilegeSeparation to no | |
| # You can also change other settings of SSHD like port in this file | |
| # Generate key pairs | |
| ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -q -N "" | |
| ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -q -N "" | |
| ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -q -N "" | |
| ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -q -N "" |
| # Define some required dependencies | |
| require "bundler/inline" | |
| gemfile(false) do | |
| source "https://rubygems.org" | |
| gem "activerecord", "~> 4.2.8" | |
| gem "sqlite3" | |
| end | |
| require "active_record" |
| # Linux | |
| # add the following to "~/.gitconfig" file | |
| [merge] | |
| tool = intellij | |
| [mergetool "intellij"] | |
| cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED") | |
| trustExitCode = true | |
| [diff] |
| require 'docile' | |
| # Family tree node, mother and father are Person values as well | |
| Person = Struct.new(:name, :mother, :father) | |
| # Recursive dsl in a mutating builder using Docile | |
| def person(&block) | |
| Docile.dsl_eval(PersonBuilder.new, &block).build | |
| end |
| ActiveAdmin.register Project do | |
| # Don't forget to add the image attribute (here thumbnails) to permitted_params | |
| controller do | |
| def permitted_params | |
| params.permit project: [:title, :summary, :description, :thumbnail, :date, :url, :client_list, :technology_list, :type_list] | |
| end | |
| end | |
| form do |f| |
| namespace :grape do | |
| desc 'Print compiled grape routes' | |
| task :routes => :environment do | |
| API.routes.each do |route| | |
| puts route | |
| end | |
| end | |
| end |
| <!DOCTYPE HTML> | |
| <html lang="en-US"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>test upload by chunk</title> | |
| </head> | |
| <body> | |
| <input type="file" id="f" /> | |
| <script src="script.js"></script> |
| # Original from http://snippets.dzone.com/posts/show/4468 by MichaelBoutros | |
| # | |
| # Optimized version which uses to_yaml for content creation and checks | |
| # that models are ActiveRecord::Base models before trying to fetch | |
| # them from database. | |
| namespace :db do | |
| namespace :fixtures do | |
| desc 'Dumps all models into fixtures.' | |
| task :dump => :environment do | |
| models = Dir.glob(RAILS_ROOT + '/app/models/**.rb').map do |s| |
| # lib/custom_logger.rb | |
| class CustomLogger < Logger | |
| def format_message(severity, timestamp, progname, msg) | |
| "#{timestamp.to_formatted_s(:db)} #{severity} #{msg}\n" | |
| end | |
| end | |
| logfile = File.open("#{Rails.root}/log/custom.log", 'a') # create log file | |
| logfile.sync = true # automatically flushes data to file | |
| CUSTOM_LOGGER = CustomLogger.new(logfile) # constant accessible anywhere |