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:
See https://yihui.shinyapps.io/voice for the live demo. Make sure you have turned on your microphone and allow the web browser to have access to it. Credits go to annyang and also to @wch for showing me a minimal Shiny example. You can do four things on the scatterplot using your voice input:
title good morning
color blue
Minimal R shiny app demonstrating:
%!TEX TS-program = xelatex | |
\documentclass[12pt]{scrartcl} | |
% The declaration of the document class: | |
% The second line here, i.e. | |
% \documentclass[12pt]{scrartcl} | |
% is a standard LaTeX document class declaration: | |
% we say what kind of document we are making in curly brackets, | |
% and specify any options in square brackets. |
library(ShortRead) | |
# Root of .bam filename | |
sname <- "HG00100.unmapped.ILLUMINA.bwa.GBR.low_coverage.20130415" | |
# Construct path to file | |
fname <- file.path("alignments",paste(sname,".bam",sep="")) | |
# Read alignments | |
bm <- readGappedAlignments(fname) |
set.seed(1026) | |
# dummy 2-D data: yi~xi(x1,x2) | |
x = rbind(cbind(rnorm(50, 1, 0.3), rnorm(50, 2, 0.3)), cbind(rnorm(50, 2, 0.3), rnorm(50, 1, 0.3))) | |
# [,1] [,2] | |
# [1,] 1.6565944 1.696906 | |
# [2,] 0.9467358 1.458583 | |
# [3,] 0.9444174 1.513886 | |
# [4,] 0.2480391 2.273355 | |
# [5,] 0.8328066 2.078371 | |
# [6,] 0.9569322 2.174178 |
# OS X termial theme | |
# tell ls to be colourful | |
export CLICOLOR=1 | |
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx | |
# tell grep to highlight matches | |
export GREP_OPTIONS='--color=auto' | |
# alias | |
alias ls='ls -FGal' | |
# set custom bash prompt | |
#export PS1="\[\033[1;34m\]\!\[\033[0m\] \[\033[1;35m\]\u\[\033[0m\]:\[\033[1;35m\]\W\[\033[0m\]$ " |
<snippet> | |
<content><![CDATA[ | |
{% highlight ${1:LanguageType} %} | |
${2:CodesHere} | |
{% endhighlight %} | |
$0]]></content> | |
<tabTrigger>mdcd</tabTrigger> | |
<scope>text.html.markdown.multimarkdown, text.html.markdown</scope> | |
</snippet> |
# http://rosettacode.org/wiki/Sorting_algorithms/Merge_sort#Perl | |
sub merge_sort { | |
my @x = @_; | |
return @x if @x < 2; | |
my $m = int @x / 2; | |
my @a = merge_sort(@x[0 .. $m - 1]); | |
my @b = merge_sort(@x[$m .. $#x]); | |
for (@x) { | |
$_ = | |
!@a ? shift @b : |