20141006

Recipe Gen v0.1.1 released

Recipe Gen

Description

A tool to generate cook books using a basic XML recipe format described below.

Dependencies

  • pdflatex
    • apt-get install texlive-latex-extra
  • texml
    • Download and install from source

Installation

git clone <REPO URL>
cd recipe-gen
sudo make install

Usage

recipe-gen <Path to RECIPE-BOOK.xml>

XML Format

Some elements/attributes listed below are listed as required and/or optional. If an required elements/attributes are missing, I don't think it will break anything. Likewise, in certain cases if optional elements/attributes are missing, it might break. YMMV.

Recipe

  • /recipe/name
    • Name of the recipe.
    • Required
  • /recipe/source
    • Source of the recipe.
    • Required
  • /recipe/source/a/@href
    • Link to a webpage.
    • Optional. Required if element /recipe/source/a exists.
  • /recipe/source/a/text()
    • Text associated with the link.
    • Optional.
  • /recipe/source/ingredients
    • Lists the ingredients in the recipe.
    • Required.
  • /recipe/source/ingredients/@heading
    • Name of the section of ingredients.
    • Useful if there are multiple 'sub recipes' within the recipe (eg. crust, topping, etc).
    • Optional.
  • /recipe/source/ingredients/ingredient/
    • Individual ingredient in the recipe
    • Required.
  • /recipe/source/ingredients/ingredient/amount
    • Amount of the individual ingredient in the recipe.
    • Has attributes:
      • @value
      • @unit
        • Special unit "natural" will hide the unit (useful for describing "3 Large Eggs", for example.)
    • One or more required.
      • Only first one is used at the moment. Others can be added for different measuring systems.
  • /recipe/source/ingredients/ingredient/name
    • Name of the ingredient
    • What would be listed on a potential grocery list
    • Required.
  • /recipe/source/ingredients/ingredient/note
    • What to do with the ingredient prior to starting the recipe.
      • Example: A recipe calls for a sliced apple as an ingredient. You could put "Apple" as the name of the ingredient and "sliced" as a note.
    • Optional. More then one is allowed.
  • /recipe/source/directions/
    • Lists the directions for the recipe.
    • Required.
  • /recipe/source/directions/@heading
    • Name of the section of directions.
    • Useful if there are multiple 'sub recipes' within the recipe (eg. crust, topping, etc)
    • Optional.
  • /recipe/source/directions/step
    • An individual step in the list of directions.
    • Required.

Example

<recipe>
    <name>
        Bread Muffins
    </name>
    <source>
        My Kitchen
    </source>
    <ingredients>
        <ingredient>
            <amount value='1' unit='cup' />
            <name>
                Warm Water
            </name>
        </ingredient>
        <ingredient>
            <amount value='1.25' unit='tsp' />
            <name>
                Yeast
            </name>
        </ingredient>
        <ingredient>
            <amount value='0.25' unit="tbsp" />
            <name>
                Sugar
            </name>
        </ingredient>
        <ingredient>
            <amount value='some' unit="natural" />
            <name>
                Bread Flour
            </name>
        </ingredient>
    </ingredients>
    <directions>
        <step>
            Preheat oven to 375F.
        </step>
        <step>
            Mix water, yeast, and sugar.
        </step>
        <step>
            Let yeast spawn for about 15 min.
        </step>
        <step>
            Mix in flour until bread dough consistency.
        </step>
        <step>
            Cut dough in to muffin sized chunks and place in muffin tin. Make sure the outside of the dough balls are covered in flour and not sticky.
        </step>
        <step>
            Let rise on the oven vent.
        </step>
        <step>
            Bake for 20 - 25 min.
        </step>
    </directions>
</recipe>

Recipe Book

  • /recipe-book/title
    • A title for the recipe book.
    • Required
  • /recipe-book/author
    • The author/compiler/editor for the recipe book.
    • Required
  • /recipe-book/recipes
    • A section of recipes
    • One (or more) required
  • /recipe-book/recipes/@heading
    • A heading to separate different sections of the book.
    • Required if more then one /recipe-book/recipes elements.
    • Optional if only one /recipe-book/recipe element.
  • /recipe-book/recipes/recipe
    • Contents of a single recipe
    • Required
  • /recipe-book/recipes/recipe/@href
    • The path to a recipe.
    • Optional.
    • Required if /recipe-book/recipes/recipe/<sub-elements> is empty.
    • Takes precedence over the contents of /recipe-book/recipes/recipe.
  • /recipe-book/recipes/recipe/<sub-elements>
    • Information on a recipe.
    • Follows the same format as a separate recipe xml.

Example

<recipe-book>
    <title>
        Recipe Book
    </title>

    <author>
        Aaron Herting
    </author>

    <recipes heading="Dinners">
        <recipe href="recipes/helgas_red_cabbage.xml" />
    </recipes>

    <recipes heading="Breads">
        <recipe>
            <name>
                Bread Muffins
            </name>
            <source>
                My Kitchen
            </source>
            <ingredients>
                <ingredient>
                    <amount value='1' unit='cup' />
                    <name>
                        Warm Water
                    </name>
                </ingredient>
                <ingredient>
                    <amount value='1.25' unit='tsp' />
                    <name>
                        Yeast
                    </name>
                </ingredient>
                <ingredient>
                    <amount value='0.25' unit="tbsp" />
                    <name>
                        Sugar
                    </name>
                </ingredient>
                <ingredient>
                    <amount value='some' unit="natural" />
                    <name>
                        Bread Flour
                    </name>
                </ingredient>
            </ingredients>
            <directions>
                <step>
                    Preheat oven to 375F.
                </step>
                <step>
                    Mix water, yeast, and sugar.
                </step>
                <step>
                    Let yeast spawn for about 15 min.
                </step>
                <step>
                    Mix in flour until bread dough consistency.
                </step>
                <step>
                    Cut dough in to muffin sized chunks and place in muffin tin. Make sure the outside of the dough balls are covered in flour and not sticky.
                </step>
                <step>
                    Let rise on the oven vent.
                </step>
                <step>
                    Bake for 20 - 25 min.
                </step>
            </directions>
        </recipe>
    </recipes>
</recipe-book>

20140916

The New Dining Room Table

After watching the Swords and Stitches video where they made a table from a pallet, I decided to try my hand at making a similar table.


I acquired a pallet from work and proceeded to strip it down to its individual parts.

The pallet from work
Unfortunately, this pallet was made of rather poor wood and split if you look at it funny. Fortunately, I had saved a Halloween decoration coffin from a few years ago. The 1x4's from the coffin were a perfect replacement for the bad ones from the pallet.

1x4's from the coffin
Underside after everything
was cut to size.
After cutting the wood to size (including ripping the center most 1x4), I laid the wood out using clamps to hold the 2x4 frame together.

Clamped frame.
I screwed the top together, sanded it, and burned it. After the table top was burned enough, I put 4 coats of polyurethane on it.

After 2 of the four coats
of polyurethane
Added some legs (3/4 inch pipe, capped, attached with floor flanges), and out came a table.

Finished table!

20140506

ADS-B to KML v0.1 now released

[GitHub]
[RubyGems]

The README follows:

adsb2kml

This is a library to make it easy to view ADS-B traffic in Google Earth.
It was originally used as part of a presentation at Imagine RIT where the data was merged with APRS traffic from aprs.fi.

Using repository code

When using the code cloned from the git repository, two basic implementations are included.
cons_fe.rb is a basic console front end that looks very similar to the interactive view of dump1090.
sin_fe.rb uses Sinatra to provide the KML file to Google Earth. This KML file gets regenerated every time the server gets a new request.
In either case, a dump1090 server must be available and serving SBS1 format data (any server providing this data should work but has only been tested with dump1090). The provided config.rb.example file can be copied to config.rb and edited to set the hostname and port number of the server providing this data.
Also, after 120 seconds (2 minutes) of not hearing any packets from a plane, the plane will be removed from the list of planes.

sin_fe.rb specific info

The plane clipart is a modified version of the image that was found here, and is in the public domain. You can set your own by changing the file public/plane_icon.png. What ever you put there, you should set the top of the image to be the front of the plane. This allows the heading to be properly viewed in Google Earth.
When sinatra is running, the "dynamic KML" can be found at the location /adsb.kml.

Dependencies

NOTE: This project does add some files to the module created by ruby_kml.
[Edit: Spell check]

20140429

Forensics timeline

One of my recent labs for my Unix Forensics class, was dissecting an OS X Time Machine backup. A requirement of the report was to create a timeline of file changes on the system. The image was given to us in a tar.gz at the file system level. This destroys all but the modified time stamps. Regardless, I created a video time line of the time machine backup. This is built using the open source project Gourse and the log was created a basic shell script (also embedded below). A few things of note: 


  1. Currently has mixed usefulness. There are many times when there is so much happening that useful info is drowned out. By limiting directory scope it might become more useful. 
  2. Only takes into account last modified times, since that is the only accurate time stamp I have access to. Might be interesting to use this with a mature Time Machine backup.
  3. Files disappear from the tree after not being touched after some time. As files only get touched once (see number 2) files disappear.
  4. Hidden files are not shown as I forgot find * doesn't list them by default.
  5. Most of the time line is prior to install of the OS. The "Some Forensics User" doesn't actually do anything until 1:14:34. At that point so much is happening that #1 above comes into play.




20140410

RPi Wireless Headsets [Update 1]

After I got receive audio working through the mumble-ruby library, I moved the code over to the RaspberryPi and it keeled over. Apparently, it isn't fast enough to receive the audio from the mumble channel, convert the Opus packets to PCM, and output to the speakers. I haven't even attempted to push audio back into the channel. I might be able to increase the efficiency of the code a bit, but I don't know how much.

20140409

Adding receive audio to mumble-ruby

For my upcoming project, RPi Headset, I needed the ability to pull audio from the current mumble channel and send it to the speaker. The problem, is that the Mumble-Ruby library only had support for sending audio to the current channel. I started looking into what it would take to add this feature. I realized that the Opus-Ruby library didn't have support for decoding Opus packets. Two weeks later, I'm was still banging my head against the problem. In hindsight, I realize that I was trying to diagnose too many problems at once:

  • Trying to work with C and pointers in Ruby
    • When Ruby throws a fatal stack overflow error you know you're doing something silly
  • Learning libopus
    • I don't know how much I can blame on their doc or on my own lack of working with audio libraries before. Probably a bit of both.
  • Learning the Mumble protocol
    • This I will blame on their doc. It is outdated, incomplete, and/or not presented in a very understandable form. (I won't fault the devs for this issue. They aren't the most staffed of FOSS projects.)
Earlier this week, I finally had some useful(ish) audio coming out of my speakers; not great, but recognizable. Yesterday, I stepped into #opus on freenode, and described my problem. Within half an hour, they'd helped me realize that I'd overlooked that fact that the opus_decode function returns a number of shorts not bytes contained in the decoded array. Audio then worked great, I cleaned up the code and pushed it up.


[Original Issue]

20140404

Captioning foot switch

With the number of captions I have been doing for SparkFun, I started to poke around with dedicated captioning programs. I have pretty much decided on Gnome Subtitles as my caption tool. The play/pause function is bound to the most convenient key of F5. Instead of trying to rebind it to another key on the keyboard, (because, TBH it's probably the best of the available options) I modified the Morse Code Practice Keyer I talked about earlier.

I attached a foot switch to it and programmed the Digispark to act as a keyboard and generate F5 keystrokes.




20140403

Morse Code Practice Keyer

After getting my first iambic paddle, I needed something to generate tones for practicing. I had a few parts lying around so I tossed this together.

[Code for Digispark]





20140402

Mac and Cheese

Panko is a bit more brown then I normally like.
Still good though :)

Ingredients

  • 1 box Annie's shells and white cheddar
  • 1/4 - 1/2 cup milk (I use skim)
  • 2 Tbsp butter (I use salted... I have to salt Annie's if I don't and salted butter has about the right amount for me)
  • Cheese. It doesn't really matter what type. I've used:
    • Cheddar
    • Mozzarella
    • Colby Jack
    • Provolone
  • Vegetables. I've used:
    • Frozen peas
    • Frozen corn
    • Fresh broccoli
    • Green onions
    • Jalapenos
    • Mushrooms
    • Snow or sugar snap peas
  • Meat. I've
    • Cooked in imitation crab
    • Served with hot dogs
  • Panko

Instructions

  1. Cook the pasta as directed
  2. While the pasta is draining, make the cheese sauce as directed using 1/4 cup milk and the butter.
  3. Heat up oven to 350 F
  4. Add the extra cheese and heat until melted.
  5. Add more milk to thin it as necessary.
  6. Stir in vegetables and meat (if your mixing in)
  7. Pour pasta into a 9x9 (ish) baking pan
  8. Pour cheese/vegetable mixture over pasta
  9. Sprinkle panko liberally on top
  10. Bake for 15 minutes
  11. Broil untill panko is browned
  12. Serve

20140323

ADVFOSS - RPi Wireless Headsets

TL;DR:

Software that allows a Raspberry Pi to act as a headless Mumble headset. Similar to headset systems used in theatre.

Libraries Needed:

  • mumble-ruby
  • opus-ruby

Upstream Repo:


  • [GitHub]
  • [RubyGems] (Coming Soon)

Hardware Needed:

  • Headset
  • RPi
  • USB battery pack
  • WiFi Card

Team Members:

  • Aaron Herting (qwertos) <aaron@herting.cc>

Milestones:

  • March 29 - Have a good proof of concept hacked together
  • April 5 - Have the necessary code changes pushed upstream.
    • This package will require code pushed upstream to both the 'mumble-ruby' and 'opus-ruby' gems
  • April 12 - Have Code finished
  • April 19 - Test and Document
  • April 26 - Package

[Update 20140409] - Name change

20140309

URIx-Util [Update 2]

I now have the library working on the Raspberry Pi! A new GitHub repository, called Radio-SIP, has spun up with an implementation of the library [link]. (All of the development has been happening on a different branch. I'll move things to master once the gem for URIx-Util goes live.)

When it is all set up, the topology is laid out like:


The Radio Gateway, in the above picture, is what is running the software I have written. Within this node, the software is related to itself in the following way: 



This setup was successfully demoed in class. I am planning on creating a video demonstration at some point, but it might have to wait a few weeks.

Here is a sort of cluttered image of the setup:



PS- If anyone wants the source for the diagrams above, feel free to ask for them. I was originally going to post all GraphViz sources to GitHub gists, but I don't know how useful they are to anyone else, and I don't really want to clutter my gists.



SparkFun Video Captioning [Part 3]

And another one gets pushed up. This time I decided to look in the Fedora repos for a subtitle editor. I found two, and for this one, I decided to uses gnome-subtitles. It's pretty good. It takes care of all of the formatting, the time code manipulation, etc. The key bindings aren't the best though.

[Pull Request]
[Video]
[More SF Captions]

SparkFun Video Captioning [Part 2]

I just submitted a new pull request for a SparkFun video caption file. I feel this work is relatively easy, long and tedious sometimes, but easy. Definitely a positive: my typing speed is improving.


20140225

SparkFun Video Captioning

After spending many hours working on captioning SparkFun According to Pete Ep. 34, I definitely have a new appreciation for the people who do this for a living. It is long and tedious work. Also, I have found that there is a delicate balance between trying to stay true to what the speaker is saying, and making readable captions; especially when the speaker says "um" (and similar) a lot.

Pull request here.

[More SF Captioning]

20140224

Baresip DTMFIO module

The main thing that I will be using the URIx-Util lib for once it is "finished" is to control a radio's push to talk signal while it is being fed audio from some form of VoIP program. Historically, this has been SIP since, prior to the URIx-Util library being written, the only program that we have been able to find that will control the URIx is the extremely out of date chan_usbradio Asterisk module. In this setup, the radio had to be connected to the Asterisk server. This means, if you have radios in multiple places you had to have (and administer, and secure) multiple Asterisk servers and deal with trunking.

Yesterday, I came across the baresip program: an extremely basic, command line, SIP client. After messing around a bit with the program, I found that it had major potential to be the client that served the radios. I set up a test which utilized the URIx-Util lib and snagging the stderr of the baresip program. After much cringing at how gross this code was, but proving the concept worked, I was very happy and began to plan how to better get the DTMF events out of the SIP client.

Thus, I began the process of learning a C based module API that has no (real) documentation associated with it (at least that I could find).

After a few hours of poking at it, giving up, realizing a better way to do it, more poking at it, etc., this pull request was born.

Here is the info from the pull request:

DTMFIO Module

Description

Writes received dtmf button presses to a FIFO located at /tmp/dtmf.out.
Also, will write an 'E' when a call is established and an 'F' when the call is finished.

To Do

  • Proper error handling
  • Using a dtmf.in file, be able to send DTMF signals
  • Use a filename specified by the user in the config file
  • Clean up build output so there aren't errors regarding unused vars

20140221

URIx-Util [Update 1]

I have been working on the URIx-Util [github] library and utility for the past week, and I am able to talk to the device using the Ruby bindings to libusb.

Resources I have been using:

Currently, the library is working, but in no way is it stable. Libusb has the potential to throw many, many errors, and URIx-Util is not gracefully handling ANY of them.


20140216

ADVFOSS - Ruby URIx Library

TL;DR:

A command line utility and Ruby library to control the URIx device.

Libraries Needed:

Upstream Repo:



Code will be released on rubygems. Link to come later.

Hardware Needed:

Team Members:

  • Aaron Herting - qwertos <aaron@herting.cc>

Milestones:


  • 2014.02.22 - Have proof of concept code finished
    • Can talk to the URIx device and see things happen
  • 2014.03.01 - Have the library and command line utility finished
    • Also, have a cable to connect the URIx to the FT-817 
  • 2014.03.08 - Have testing and documentation finished

[UPDATE 1]: Link to development repository added

20140206

Mounting the Dirt Cheap Paddle

The Dirt Cheap Paddle needs to be mounted. Here are some notes on what I did.
  • The box is a smallish Radio Shack project box
  • I drilled two holes in the metal top and one on the back
    • On the top:
      • Hole for the signal wires
      • Hole for the mounting screw
    • On the back:
      • Hole for the 3.5mm TRS port
  • There is 15 (or 20... I can't remember) pennies in there for weight.




Adventures in Morse Code

As a bit of a communications nerd, I have been wanting to learn morse code for a while now. Tried and "got too busy" many times. Finally, I got around to putting these recordings on a flash drive and hooked it up to my car. Now, as a captive audience during the commute to class, I'd listen to them. After a few listen times listening through the tracks, I started looking for purchasing or making an iambic paddle. As I currently don't have (easy) access to many tools, making one was slightly out of the question. Looking around online for a cheaper iambic paddle is hard. Many of them are more expensive than what I want to pay for a first paddle, in case I "ran out of time" again. On the other hand, I didn't want to get one that I'd want to replace if I did stick with it during the short term. I eventually went with the American Morse Dirt Cheap Paddle. I tend to agree with most of eHam's reviews.

Positives:

  • Well made
  • Inexpensive
Negatives:
  • Need to mount it on something, to protect the connections.
Other comments:
  • It does not come polished. This does not impact the function. Some of eHam's reviews say that they found some burrs that were uncomfortable, but I didn't find anything.

20140204

RIT Advanced FOSS Course

One of the classes I am taking this term, Advanced FOSS, requires us to keep a blog. Instead of spinning up another one I will be using this one. Any posts for this class will be tagged under RIT-ADVFOSS.

Part of this class is going to be helping in other open source projects and/or communities. During this class, any community projects that I am a part of, will also be tagged under RIT-ADVFOSS.

This course has 3 release cycles. In 5 weeks design, develop, and release a tightly scoped open source project on a raspberry pi. (3 * 5 = 15 weeks in the semester)

For more information, the course website is located here.

20140116

The Switch to Grml

I have been thinking for a while about switching from Slitaz as the base OS used for many of my PXE booting tools. Slitaz is great for this and makes it really easy to build the tools that I have made, but it has been over a year since the last major update has been released. Over the next couple of weeks, I am going to be looking into moving to Grml as the new base OS.

Positives:

  • Debian based
    • More packages available
  • Updated more regularly

Negatives:
  • Going to take a bit of time and work to re-do the code
    • (Though this is a blessing in disguise as it will give me the opportunity to better document the builds)


Please comment if you have had any experience with Grml. :)