Skip to content

Instantly share code, notes, and snippets.

View weirdpercent's full-sized avatar

Drew Prentice weirdpercent

View GitHub Profile
(import '(javax.sound.sampled AudioSystem DataLine$Info SourceDataLine
AudioFormat AudioFormat$Encoding))
(def popular-format
(AudioFormat. AudioFormat$Encoding/PCM_SIGNED
48000 ; sample rate
16 ; bits per sample
2 ; channels
4 ; frame size 2*16bits [bytes]
48000 ; frame rate
@weirdpercent
weirdpercent / html2doku
Last active October 8, 2018 13:18
Perl script to convert HTML to Dokuwiki markup using the HTML::WikiConverter module
#!/usr/bin/perl -w
# Perl script to convert HTML files to DokuWiki Markup.
# Requires HTML::WikiConverter Perl module
use HTML::WikiConverter;
print "HTML to DokuWiki markup converter\n";
my $argcnt = $#ARGV + 1;
if ($argcnt == 2) {
print "Converting...";
require 'rubygems'
require 'benchmark'
require 'yaml'
require 'zaml'
require 'json'
yaml_str = <<-eos
yaml goes here
eos
# sudo gem install bson
# sudo gem install bson_ext
# sudo gem install yajl-ruby
# sudo gem install json
# sudo gem install msgpack
require 'rubygems'
require 'benchmark'
require 'yaml'
require 'bson'