Skip to content

Instantly share code, notes, and snippets.

Benjamin Trott btrott

Block or report user

Report or block btrott

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:444317
<!DOCTYPE html>
<meta charset="utf-8">
<div id="gallery-widget"></div>
<script type="text/javascript" src=""></script>
<script type="text/javascript">
btrott /
Created Nov 2, 2010
Perl implementations of the list2str functions at
#!/usr/bin/perl -w
use strict;
use Benchmark qw( timethese cmpthese );
use List::Util qw( reduce );
my $list = rand_chars( 256 );
cmpthese( shift || 1, {
f1 => sub { f1( $list ) },
btrott / gist:764398
Created Jan 4, 2011
Prompt for OS X voice input
View gist:764398
#!/usr/bin/env python
from subprocess import call
while 1:
say = raw_input('say? ')
call(['say', say])
You can’t perform that action at this time.