Category: Code

December 5th, 2015

Flight Tracker

Here’s a flight tracker project I’ve been working on. This is based on an assignment for a Ruby class. It has a Sinatra-powered server, an inbound flight simulator, a tracker backed by a SQLite database, and a frontend built with jqPlot, Bootstrap, and some rather sloppy jQuery. Full project description and design spec are on the Github project page.

tracker_screenshot

  • Google Bookmarks
  • Reddit
  • Facebook
  • LinkedIn
  • Twitter
Posted in Code  |  No Comments

NextGEN imageOne of the hacks I put in place for my new site design was to get image titles to display when you click on an image in the gallery. This isn’t out-of-the-box functionality for the NextGEN plugin; the description (which you set manually in the gallery manager) is populated, but the image title is not. The solution lies in modifying the title attribute of the a tag generated by gallery.php. To see an example of this hack in action for images with and without descriptions, visit the Space Needle pictures gallery and click on the last two images in the set. One shows only the image title, the other shows title and description. Code after the fold.

Update 11.19.2010: Now with EXIF! (maybe)
read more …

  • Google Bookmarks
  • Reddit
  • Facebook
  • LinkedIn
  • Twitter
Posted in Code  |  73 Comments

If you know why you’re reading this already, skip to the code below the fold. Otherwise, here’s some explanation. In a project Work Breakdown Structure (WBS), tasks are organized into major tasks, sub-tasks, sub-sub-tasks, etc. as in the following example which is an actual project plan used by NASA:

1      Build a spaceship

1.1      Read wikipedia article on spaceships to determine required supplies

1.2      Buy spaceship supplies

1.3      Assemble spaceship

1.3.1      Attach top part to middle part

1.3.2      Attach middle part to thruster thingie

1.3.3      Paint spaceship a neat-o color

1.4      Set spaceship upright (facing sky)

2      Fly around in spaceship

3      Discover strange new worlds

4      Return home 

4.1      Point spaceship at Earth

4.2      Land spaceship on Earth

4.3      Park spaceship in designated parking space
 

Instead of sequentially numbering the tasks, we assign subtask numbers to those tasks that roll up under other tasks. Assemble spaceship is a subtask of Build a spaceship so it gets Build a spaceship‘s number (1) plus a subtask number (3, since it’s the third subtask) so its WBS number is 1.3. Attach top part to middle part is a subtask of Assemble spaceship, so it gets 1.3 plus a sub-subtask number (1.3.1), and so on. MS Project also bolds any items with subtasks.

Since this type of WBS or outline numbering functionality isn’t available in Excel, it requires a VBA macro. Free code after the fold.

read more …

  • Google Bookmarks
  • Reddit
  • Facebook
  • LinkedIn
  • Twitter
Posted in Code  |  70 Comments

December 30th, 2007

Code of the Samurize

I wrote a VB script for Samurize, an easy-to-use, free Windows desktop playground for creating MacOS-like widgets and powerful system monitoring tools. Building my own desktop widget, I discovered that there wasn’t a built-in tool or any plugins available for identifying the current WiFi security mode in use. That is, I want my widget to tell me if I’m connected via WEP, WPA, etc. On my Linux systems, I can see at a glance what network I’m connected to and what security is in use. In Windows, this is slightly more challenging.

It wasn’t terribly difficult to create my own once I learned a bit about navigating the Windows Management Instrumentation, and I also learned that Samurize doubles as a handy testing ground for all kinds of VB scripts. Here is the result (click on the image to see my desktop widget that I’ve integrated this into):

Wireless Mode Indicator

You can download my Samurize config file, which contains the script and indicator icons, from the Samurize website. I have also included the VB code below.

read more …

  • Google Bookmarks
  • Reddit
  • Facebook
  • LinkedIn
  • Twitter
Posted in Code  |  No Comments