Skip to content

Instantly share code, notes, and snippets.

View localredhead's full-sized avatar

Levi Strope localredhead

View GitHub Profile

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

npm install -g jsxhint
# spec/lib/tasks/notification_rake_spec.rb
require 'spec_helper'
describe 'notifications:weekly' do
include_context "rake"
let(:users){ [double(:user)] }
let(:user_deliveries){ double(:user_deliveries) }
before{ User.stub(:all).and_return( users ) }
@localredhead
localredhead / delete branches
Created October 16, 2014 22:46
delete all branches
$ git branch | grep -v "master" | xargs git branch -D
@localredhead
localredhead / grrrr.el
Last active August 29, 2015 14:05
pffft.
(add-hook 'ruby-mode-hook
(lambda ()
(run-at-time 10 nil
(lambda ()
(robe-mode 1)
(robe-start)))))
-------- request JSON ---------
"build": {
"monogram": {
"name": "Monogram",
"id": 33
},
"placket": {
"name": "Placket",
"id": 18
},
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
ENV["WATCHR"] = "1"
system 'clear'
def growl(message)
growlnotify = `which growlnotify`.chomp
title = "Watchr Test Results"
puts message
image = message.match(/\s0\s(errors|failures)/) ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png"
options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'"
system %(#{growlnotify} #{options} &)
@localredhead
localredhead / .irbrc
Created May 18, 2013 02:00
pbcopy for irb sessions.
IRB.conf[:PROMPT_MODE] = :DEFAULT
def pbcopy(input)
str = input.to_s
IO.popen('pbcopy', 'w') { |f| f << str }
str
@localredhead
localredhead / tmux_sess
Created May 11, 2013 00:38
TMUX setup to launch emacs --daemon (OSX)
1. create .sh file, add this to it:
#!/bin/sh
/Applications/Emacs.app/Contents/MacOS/Emacs --daemon
2. Use platypus to wrap the .SH file as a .app.
3. Add .app to Login Items
4. Edit .tmux.conf and add "new session"