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:
if [ "$#" -lt 1 ]; then | |
echo 'Must supply an input file' | |
exit 1 | |
else | |
if [ "$#" -lt 2 ]; then | |
output=output | |
else | |
output=$2 | |
fi |
@words = IO.foreach('letterpresswords').map{|l| l.chomp}; nil | |
def go(boardstr, bonus1str='', bonus2str='', max=4) | |
board = boardstr.split(//) | |
bonus1 = bonus1str.split(//) | |
bonus2 = bonus2str.split(//) | |
boardfq = board.inject(Hash.new{0}) {|h, l| h[l]+=1;h} | |
@words | |
.select{|w| w.size > max && w.split(//).inject(Hash.new{0}) {|h, l| h[l]+=1;h}.all?{|(l,c)| boardfq[l] >= c}} |
#!/usr/bin/env node | |
// mc hammer javascript cross-compiler | |
// 1. youtube-dl http://www.youtube.com/watch?v=otCpCn0l4Wo -o cant_touch_this.flv | |
// 2. avconf -o cant_touch_this.flv cant_touch_this.wav | |
// 3. sox cant_touch_this.wav -t s16 -r 8k -o cant_touch_this.raw | |
// 4. run this file (node make_touch_this.js) | |
// 5. npm install -g baudio-party | |
// 6. baudio-party & | |
// 7. curl -sSNT cant_touch_this.js http://localhost:5000/0 |
go to http://embedclip.herokuapp.com/ {yourid}.md
EXAMPLE: https://embedclip.herokuapp.com/lipjdmagqurraxhaaqrvfoipccrt.md
paste it into a gist
$gutter: 10px; | |
$grid-unit: 60px; | |
%clearfix { | |
*zoom: 1; | |
&:after { | |
content: "\0020"; | |
display: block; | |
height: 0; | |
clear: both; |
class Dingo | |
def self.bark | |
"woof" | |
end | |
def self.eat | |
"A dingo ate my baby!" | |
end |
class Array | |
# split array into groups up to n items, randomly choosing the size. | |
def split_random(n) | |
size == 0 ? self : (size == 1 ? [self] : self[1..-1].reduce([[self[0]]]){|ll, elt| (rand(n)==(n-1) || ll[-1].size==n) ? ll + [[elt]] : ll[0..-2] + [ll[-1] +[elt]]}) | |
end | |
end |
class Array | |
def split_random(n) | |
def td(n) | |
[take(n),drop(n)] | |
end | |
def split_random_acc(n,l, acc) | |
head,tail = l.td(rand(n)+1) | |
return (acc + [head]) if tail==[] | |
split_random_acc(n, tail, acc + [head]) |
# There is more than one way to skin a cat, different coders prefer different methods. | |
include ActionView::Helpers | |
class Link < Struct.new(:title, :url); end | |
a = Link.new("Google", "http://www.google.com") | |
b = Link.new("Hacker News", "http://news.ycombinator.com") | |
array_of_links = [a, b] |