A friend was complaining that there was nowhere he could find to get an RSS listing of movie showtimes... so I made a little script using Hpricot to parse forreel.com - hopefully they don't mind...
Well we've finally launched Viviti - It's a web based/hosted CMS system that's component based. Fully themable using normal HTML, and all editable in browser (drag-n-drop to move stuff around, etc.). As it is now, it supports adding custom blocks (text or html blocks), rss feeds, blogs, and a few other components. It's pretty neat, and as we add more components will become more and more flexible.
Currently it's still in a invite only phase, as we work through some final touches - but we will start sending out invites to people who request a beta key soon.
Then you have to set XDG_DATA_DIRS to point at the right place on OS X, which is /opt/local/share. Put this in your .bashrc file:
export XDG_DATA_DIRS=:/opt/local/share
XDG_DATA_DIRS is where freedesktop.org stuff looks to find files, and if not specified will look in /usr/share or /usr/local/share. Since ports on OS X puts everything in /opt/local, you have to set it.
That's pretty much it! If you don't install the shared-mime-info database and set the ENV variable the gem will still work, just not as well (returning text/plain instead of text/css for css files, etc.)
After using git for a little bit I started tinkering with ZSH, to get the current branch in my prompt.
What I ended up with is this:
Turns out it's pretty easy - somewhere in your .zshrc you need to put the following:
1234567891011
# get the name of the branch we are ongit_prompt_info() { ref=$(git-symbolic-ref HEAD 2> /dev/null) || return echo "(${ref#refs/heads/})"}autoload -U colorscolorssetopt prompt_substPROMPT='%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%c %{$fg_bold[red]%}$(git_prompt_info)%{$fg[blue]%} %% %{$reset_color%}'
The git_prompt_info function just asks git what branch we are in (and returns if we're not in a git repo), and then strips out regs/heads from the output. The colors bit is just so you can use colors like "green" instead of this awesomeness. prompt_subst is needed to tell zsh we want the git_prompt_info substituted with it's results, otherwise it will just show it as a string.
Thats pretty much it!
I initially had a right hand prompt for the branch, which while looks nicer, makes it less likely to be seen... My original prompt looked like this:
Clearing floating elements is pretty commonly handled by a a div or br tag with 'clear: both'.
Recently I ran into a problem with this; the layout I was working with was using floats for the sidebar and part of the main content had floated list of images. Using the clear both trick caused it to clear past the bottom of the sidebar.
While there are ways around that I've never been a big fan of adding the clearing divs, so I was pretty happy to find an alternative, and even happier to find one that's nice and simple.
Basically all you have to do is set the overflow to hidden, which forces the parent to expand to contain all it's children. The zoom: 1 is an IE6 specific property, which is needed to trigger IE's hasLayout.