Skip to content

Instantly share code, notes, and snippets.

View weirdpercent's full-sized avatar

Drew Prentice weirdpercent

View GitHub Profile

Project

Description: What does this project do and who does it serve?

Project Setup

How do I, as a developer, start working on the project?

  1. What dependencies does it have (where are they expressed) and how do I install them?
  2. How can I see the project working before I change anything?

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

# Runs with Picky 3.3.1.
#
# Note: You need some example html files in
# the same directory.
#
# Index data and start:
# 1. rake index
# 2. ruby app.rb
#
# Then, search on it using:
(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
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'