Consolidation, new look (forthcoming!), CSS tricks

So blagging takes a lot of buildup of “I should blag” thoughts, just like exercise, that’s why I do both of them very infrequently. I have a bunch of topics that I’ll write about soon.

I am redesigning minuslab a bit, consolidating both minuslab.net and d.minuslab.net together. Their split existence makes no sense any more. I think the only time it did make sense was when I purchased the domain back in spring 2004. At the time, I was getting really into web design / CSS stuff, and I had wanted to write articles and have content in the same vein as the great CSS sites of the time such as A List Apart, CSS Zen Garden, CSS Reboot and other such fine sites. After graduating from RPI, I didn’t quite have the time, and switching to Linux kept me away from creating mockups in Photoshop (I didn’t want to learn the GIMP at that time, having to learn enough about Linux just to get things working was enough).

So minuslab never really turned into that site. When I finally published it, I took the approach that minuslab.net was to be the “professional” version of my site, and d.minuslab.net was the “personal” side - aka blag, photos, etc. It worked well for a while, but lines started to get blurred, and the “big” portion of the professional side ended up being at code.l3ib.org.

Now, it’s time to merge the two together. I’m still in the process of figuring it out just how to do that (a lot of HTTP Redirect rules will be needed), and the design is not done, but here’s a quick preview:

v6 mockup

Kind of simple. As you can see, the layout is inspired by dwm/awesome/xmonad, and the colors from the git documentation. I hope to have this done before August, but we’ll see. Other projects are taking more time.

Ooh, I nearly forgot what prompted this post anyway. While researching how to do a new theme that integrates a bit better (instead of hacking the default wordpress theme apart), I stumbled upon Sandbox, which is designed so you only need to edit CSS and not php/xhtml stuff. This taught me something really cool. Elements can have more than one CSS class. I had no idea this was possible. I was doing stupid PHP “tricks” to get items to have the same look but a different class name, that required a lot of duplication in the CSS file.

Basically: THIS. CHANGES. EVERYTHING.

I tried it out quick on minuslab.net/themes to see that it indeed does work (minuslab is currently XML/XSLT based so viewing the source might lead to some headscratching). This will make things really simple. I can’t believe I never saw it before.

Enough for now, over and out.

Nitrogen 1.3 released!

After hearing only positive things from the RC, Nitrogen 1.3 has been released! You can grab it from here: http://projects.l3ib.org/nitrogen/files/nitrogen-1.3.tar.gz

This release improves performance and memory usage by only loading thumbnails visible to the view. It also fixes some compilation problems on some architectures regarding inotify.

I will be pinging package maintainers to update their packages.

Graphs for web pages

Last year, I ran a rather successful “pick the winners” site for the NFL that I hand coded in PHP about 3 days before the season started.  The code worked (with some bugs that I had to address mid season of course) but I plan on trashing the whole thing and starting from scratch.  Still looking at a framework to use instead of doing it by hand, but my PHP familiarity is pointing me towards using CodeIgniter.

One enhancement I had always wanted to make to the current site was to have some neat graphs to help visualize the ton of data that this site has on it.  Table form works, but when you can look at things visually, it’s much better.  I looked at doing things like running gnuplot or the various PHP libraries to do graphs, but none had the look I was after.  I didn’t need super graphing capabilities, I just wanted to do some line graphs.  I considered doing it myself with the aid of Cairo, because that was the look I wanted, when I read a blag post this morning about Open Flash Chart.

While I’m a bit mixed on feelings towards flash, this seemed the perfect use of it.  Most of my audience are Windows, non-tech types, so they won’t care about the technical limitations or philosophical issues, they just want results.  So I hacked together a quick graph today to try it out, and boy am I impressed.

nfl graphs

The data is coming from the table below.  Quick explanation: it shows the # of correct picks for a user (the red line) versus the range of points that all users picked (the green bars) so a user can see how their picks stacked up against everyone else.  Using a graph, it’s easy to see if you were the high or low picker of the week.

I really enjoy the design of Open Flash Chart, I think they did a good job separating the flash widget from the data source, and made it easy to stick data into the chart.  Cacheing would be good too, and I’m not sure how to do that, but the site isn’t high traffic enough to really bring anything to its knees.  Plus it’s flash, so it can download the embedded flash widget once, and just query for data, which is much better than having the server generate a graph like with other options.

It’s the first of many graphs and usability improvements that will go into the NFL site.  This year, I plan on having the site up and ready to go long before the season starts.

Announce: fsniper

I’ve been quiet lately as I’ve been trying to get a lot of work done on some projects. One such project which has been in development for a while with some other people was finally released. No (real) webpage, no logo, or anything of that nature yet (we do actually have some docs!) but we’ve finally released fsniper 1.0.

fsniper is hard to sum up in one sentence. The party line is “fsniper is a tool that monitors a given set of directories for new or modified files. Then, based on the file’s type or name, it invokes a script to be run on that file.” I like to remember it by the reason it was named:

watch + execute.

Watch because it watches a directory (or directories!) for certain types of files (you can match by mime-type, name (with globbing so extensions), or regular expressions. Execute because it picks a script to execute on that file. You know, just like a sniper, watching, and then executing. The “f” prefix comes from “fs” aka filesystem. So, it’s a sniper, for your filesystem. Get it?

It’s purpose is simple: wait for a file to occur, and move it somewhere. It was originally designed to be a way to create a “drop” directory, where you could move any file, and some intelligent scripts would figure out where to put that file. Examples of activities would be to move a torrent file to a server where you run your torrents, or move a background image to your background dir (handy for Nitrogen, hint hint), or say, extract a tarball that contains an Openbox theme to your ~/.themes dir.

It uses inotify to watch a dir (or dirs) for a file to be “closed for writing” which occurs after you cp or mv or even touch a file.

We’ve had dev versions in the wild, actually used by real people. I’ve been using it to ferry torrent files over to my NSLU2 which actually does the torrenting with rtorrent in a screen. Another user has done something similar and made instructions.

I wrote a set of crappy documents that leans heavily on examples because hey, that’s how a lot of people learn. It’s supposed to be in asciidoc but you can view it here until we get something permanent in place: DOCUMENTS!

Anyway, please test and hopefully you’ll find a use for it.