This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
require 'open3' | |
require 'json' | |
require 'optparse' | |
require 'digest' | |
require 'fileutils' | |
require 'shellwords' | |
class Array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'nokogiri' | |
require 'optparse' | |
# Parse args. | |
to_xml = lambda { |text| Nokogiri::HTML(text) } | |
to_string = lambda { |node| node.to_html } | |
OptionParser.new do |opts| | |
opts.banner = "Usage: #{File.basename __FILE__} [options] xpath [file]" | |
opts.separator "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yaml' | |
def usage | |
puts <<-USAGE | |
Usage: #{File.basename __FILE__} [options] file {keys|indexes} | |
Prints the value under specified keys or indexes of the YAML file. | |
Options: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'optparse' | |
require 'shellwords' | |
# encoding: UTF-8 | |
class String | |
def shellescape | |
Shellwords.shellescape self | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
def sh(cmd) | |
if not system(cmd) then raise "Command failed: #{cmd}"; end | |
end | |
# ---- | |
["cuebreakpoints", "shnsplit", "cuetag"].each { |prog| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'find' | |
require 'fileutils' | |
require 'shellwords' | |
require 'stringio' | |
include FileUtils | |
class Condition | |
def initialize(&condition) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function print_usage { | |
cat <<USAGE | |
Usage: $THIS_PROGRAM [pissing-args...] [-c|--continue] [-s|--save DIR] | |
[-l|--load DIR] [-h|--help] audio-files... | |
Plays audio files via http://anon.fm using Pissing (http://anon.fm/pissing/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TexturedPolygon2D: | |
(in development) | |
TexturedPolygon2D::Batch: | |
is: Singleton | |
Add(polygon:TexturedPolygon2D): void | |
# Draws this Batch using OpenGL and then clears it. | |
DrawAndClear(): void | |
# Remembers this Batch and replaces it with new one. |