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:
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
(verse) | |
D A Bm G | |
Gatekeeper, why won't you let me write that code? | |
D A Bm G A (D) | |
Gatekeeper, all this merging gets so very, very old! | |
D A Bm G | |
Gatekeeper, won't you please deploy my code? |
class ApplicationController < ActionController::Base | |
before_filter :authenticate_user_from_token! | |
private | |
def authenticate_user_from_token! | |
authenticate_or_request_with_http_token do |token, options| | |
user = User.find_by_authentication_token(token) | |
if user && Devise.secure_compare(user.authentication_token, token) |
I was curious about making retro gaming sounds using Sonic Pi. A couple of months and a lot of Googling later, here's the original Mario Bros theme as it was heard on the NES console.
I'm (just about) old enough to remember rushing home from school to play this game at Philip Boucher's house, sitting cross-legged in front of the TV till my feet got pins and needles. Working out how to recreate it for Sonic Pi was a lot of fun!
#!/usr/bin/env ruby | |
# Validates that you don't commit forbidden keywords to the repo | |
# You can skip this checking with 'git commit --no-verify' | |
exit 0 if ARGV.include?('--no-verify') | |
# Update this list with your own forbidden keywords | |
KEYWORDS = %w(binding.pry console.log debugger) | |
def red(text) "\033[31m#{text}\033[0m"; end |