19
Aug 09

Vote for Me!

Hello Everyone,

Please take a moment and vote a Thumbs up for my sxsw presentation titled:

“Low Cost/Low Fi Hardware Prototyping”

Cheap and easy ways to start taking your software into the physical world. This talk covers connecting your software that is unfortunately stuck in the PC world with the real world around it.

SXSWPanelPicker

http://panelpicker.sxsw.com/ideas/view/2316

Thanks,
Josh


20
May 09

How To: Get anti-aliased fonts in the Arduino and Processing IDE’s

Problem:

Arduino and Processing IDE’s both are java applications and don’t use anti-aliasing when displaying fonts on OS X.

Solution:

Add the Java Swing options to enable anti aliasing to the Info.plist file that OS X uses to launch the IDE’s.

Steps:
Right click the Arduino.app in the Finder and select ‘Show Package Contents’, double click the Contents directory and there you will find the Info.plist file. Open it in a text editor of your choice.
Add the following two lines under the Java option. See the screenshot for the exact location.

<key>VMOptions</key>
<string>-Dswing.aatext=true
</string>

UpdatePlistScreenShot

Now your code editor goes from looking like this crapness:

noaliasing

To this hotness:

withantialiasing

And even better you can use great looking fonts like Inconsolata and get an editor that looks this good:
inconsolasarduino


28
Feb 09

New Remote Remote Control Instructable up at Instructables.com

Check it out.

2009-02-27_2315


22
Feb 09

Quick look support for .mxml and .as files

I’ve recently re-installed OSX and lost my quicklook support for .mxml and .as files. Since I couldn’t find whatever packages I had installed that allowed that quicklook support, I’ve modified QLColorCode to add support for previewing both .as files and .mxml files.

It works on my computer and I hope that it’ll work on yours too.

Please feel free to download my version, qlcolorcodeqlgenerator unzip and install, let me know if it doesn’t work.

Installation instructions for quicklook plugins can be found here.

-josh


24
Jan 09

Networked Sound Board

Hi Everybody,

I’ve created a network sound board that you can use to have endless fun with co-workers.

In my office quad we have one OSX machine that is used to play music for everyone, it’s usually running last.fm, pandora or someones iTunes library as background music for everyone. Occasionally it gets cranked up when it’s time to get the led out. I was thinking that it’d be fun to be able to trigger sound effects on that machine from my machine, kind of like what happens on radio shows, expect that my co-workers wouldn’t really be able to change the channel.

So the itch was scratched and I’m proud to present the network sound board. It should run out of the box on any OSX machine with a recent installation of Python. If you’re on Windows or Linux it’ll work if you can find a command line audio player.  Anybody on the same network as the music machine will be able to trigger the sound effects from the comfort of their browsers. After you install there is a soundEffects folder that you can place sound files (.wav/mp3) into and they are instantly available, check the documentation for more info.

You can git the source from github at http://github.com/code128/networkedsoundboard/tree/master

It looks like this.

networked_soundboard

If you’re looking to extend it, adding the ability to upload new sounds from the flex interface would be sweet. If you do let me know.

Have fun.

P.S. If you can get samples of your co-workers saying things and add them to the server that would just be the icing on the comedy cake.


05
Jan 09

How To: Install Heated Handgrips on Your Motorcycle

The Parts

Hosted at instructables.com

Installing heated handgrips on a Suzuki Vstrom DL-1000


30
Dec 08

My Year in Cities, 2008

Following Jason Kottke’s example here is my year in cities for 2008 (at least as far as I can remember offhand):

    1. Big Sur, CA
    2. Los Angeles, CA
    3. Cupertino, CA
    4. Santa Cruz, CA
    5. Monterey, CA
    6. Jacksonville, FL
    7. St. Petersburg, FL
    8. Boston, MA
    9. Austin, TX
    10. Seattle, WA

      22
      Dec 08

      Just sitting here watching the logs go by.

      Some times while working on remote servers I need to watch various log files. Typically for something like this I’ll create an extremely simple script that watches all the logs at once, since the next time I’m on that machine I’ll probably have forgotten the paths in question.

      Something like this:

      tail -f /var/www/apache/access.log /var/www/apache/error.log

      The problem with that approach is really long lines wrap and I usually just care about the far left of the file, so I’ve been looking for a way to turn off wrapping in tail. Unfortunately that seems to be impossible. I tried messing with my shell to kill the extra characters with this:

      echo -e "\e[?7l\c"

      But that was messing up other things. The best solution I’ve found so far is to use less with these options

      less +F -S /var/log/apache/access.log

      +F puts it in a tail like mode and -S chops the line to the screen width, the only drawback is that it doesn’t intersperse the 2 files like tail does. I was hoping to pipe tails input into less in the this fashion but that didn’t seem to work right either.


      22
      Oct 08

      Iterating over a custom object in python

      A coworker recently needed to iterate over a custom object in python. It’s pretty easy to do, you just need to implement the __iter__ method on your object.

      Here’s some example code that shows you how to extend your object, returning everything in your objects local dictionary:

      class IterableObject(object):
          def __iter__(self):
              for item in self.__dict__:
                  yield self.__dict__[item]

      Now for sample usage:

      myObj = IterableObject()
      myObj.name = "Johnny Hammersticks"
      myObj.otherProperty = "Something Else"
      myObj.testList = [1,2,3,4]
      myObj.testDict = {1:'one', 2:'two'}
      # Serialize the IterableObject into json
      for x in myObj:
           print x, type(x)

      which returns:

      Something Else <type 'str'>
      {1: 'one', 2: 'two'} <type 'dict'>
      [1, 2, 3, 4] <type 'list'>
      Johnny Hammersticks <type 'str'>

      Oh and another handy feature of this dictionary style approach, you can do easy string formatting/printing of the object properties in this style.

      print "Hi %(name)s, your list %(testList)s" % myObj.__dict__

      Which prints:

      Hi Johnny Hammersticks, your list: [1, 2, 3, 4]

      20
      Oct 08

      FlixBot

      I’ve built a proof of concept in some hacked together python code to automatically add movies to my netflix queue when I send twitter messages to @flixbot.

      For example this tweet:

      Gets Blade into my queue. Awesome.

      I started building this out into a full fledged service so other people can use it as well. Of course I’m going to need a hosted site somewhere for people to sign up. I figured it might be a good time to play with my app engine account.

      I got part of the way of there with app engine serving up pages, but then ran into problems with xml libraries I was using in my POC not existing in the AppEngine sandbox. :(

      Also I’m starting to run out of enthusiasm.

      So that’s where I’m at. Goodnight.