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:
| require 'openssl' | |
| # We use the AES 256 bit cipher-block chaining symetric encryption. | |
| # AES 256 is virtually impenetrable using brute-force methods. | |
| # However, CBC introduces a data integrity vulnerability (stream cipher attacks). | |
| # We should use HMAC or GCM to mitigate the issue. | |
| alg = 'aes-256-cbc' | |
| cipher = OpenSSL::Cipher::Cipher.new(alg) | |
| cipher.decrypt |
| class KeyboardController | |
| def initialize | |
| @robot = java.awt.Robot.new | |
| end | |
| def type *args | |
| [args].flatten.map(&:to_s).map{|s|s.split(/\s+/)}.flatten.map(&:upcase).each do |n| | |
| press, name = (n[0]=="-") ? [false,n[1..-1]] : [true,n] | |
| press ? @robot.key_press(@code) : @robot.key_release(@code) if @code = java.awt.event.KeyEvent.const_get("VK_#{name}") | |
| end | |
| self |
| #!/usr/bin/env bash | |
| size=1024 # MB | |
| mount_point=$HOME/tmp | |
| name=$(basename "$mount_point") | |
| usage() { | |
| echo "usage: $(basename "$0") [mount | umount | remount | check | orphan]" \ | |
| "(default: mount)" >&2 | |
| } |
| module One | |
| def a(*) | |
| puts 'One...' | |
| super | |
| end | |
| end | |
| module Two | |
| def a(*) | |
| puts 'Two...' |