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 Person | |
def name | |
nickname? ? 'Bob' : 'Robert' | |
end | |
def nickname? | |
false | |
end | |
end |
# Setup HTML::WhiteListSanitizer | |
ActionView::Base.sanitized_allowed_attributes.add('style') | |
%w/margin padding padding-left padding-right padding-top padding-bottom list-style/.each do |prop| | |
ActionView::Base.sanitized_allowed_css_properties.add(prop) | |
end | |
original_string = %Q|<h1 style="color: #333 !important; font-family: arial !important; font-size: 45px !important; font-style: normal !important; font-weight: normal !important; margin: 0 0 10px 0 !important; line-height:-0.5px !important;">Test heading;<a href="https://www.google.com" style="color: #F3724E !important; font-family: arial !important; text-decoration: none !important;"> link text</a> : </h1>| | |
sanitized_string = ActionView::Base.white_list_sanitizer.sanitize(original_string) |
class Game < ActiveRecord::Base | |
belongs_to :schedule | |
belongs_to :contestant_a, polymorphic: true | |
belongs_to :contestant_b, polymorphic: true | |
has_one :score, dependent: :destroy | |
def winner | |
score.winner |
#!/usr/bin/env ruby | |
require 'bundler/setup' | |
require 'affinity_propagation' | |
require 'byebug' | |
module AffinityPropagation | |
class Calculator | |
attr_accessor :availabilities, :responsibilities, :similarities | |
end | |
end |
### | |
# Docker-related functions and aliases | |
### | |
# Include these into your ~/.bash_profile; don't replace your ~/.bash_profile with this | |
alias dc="docker-compose" | |
alias dcr="docker-compose run --rm" | |
alias dce="docker-compose exec" |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)