Let the Cloud Wars Begin!!!

This is all going the same direction. SugarSync, Google Drive, Dropbox & any new contenders (whatever Microsoft's offering is called...) are all going to end up with unlimited storage for the same price point per year, so, the sooner one of them calls it and just offers that, the better that one will do.
They need to just do that, get it out of the way, and then start developing some really compelling features, the way drop box did with their easy share links.
Got my Google Drive setup today and downgraded my SugarSync account.
I have 87GB in my Google Drive account, for the low low price of $20/year because I happened to upgrade my Picasa storage several years ago. So, GDrive auto-wins for me until someone else can beat that price, or offer some amazing compelling feature that I just can't pass up.
Events Calendar Pro Nav Formatting Messed up on Empty Calendar
The Events Calendar Pro (from http://tri.be/) has a few problems.
If you are trying to figure out why a calendar with no events in that month has completely screwed up header navigation, just put this line of code inside of table.php in the top of the display_day function (put it directly before the for loop):
$thisisherebecausethispluginSUCKSdontremoveit = has_excerpt() ? TribeEvents::truncate($post->post_excerpt) : TribeEvents::truncate(get_the_content(), 30);
This basically just runs some "truncate" function on the "TribeEvents" object. For some reason this truncate function magically fixes the header nav display issues.
Introducing GitScripts

GitScripts is a project that attempts to make Git user friendly.
I have been working on it for almost a year now. When we implemented Git in my office, we were having a really hard time using it. We loved the flexibility of the tool, but the interface was killing us. Doing something that should have been simple (merging one branch into another) was much too complex. Especially for people who were already struggling to remember how to use CVS through a GUI. These were very competent Java developers who just didn't have time to learn a new complex tool, but recognized we needed it.
One day my co-worker jokingly demanded that I write a set of wrapper scripts that would make the merge command comprehensible (he continually tried to merge one branch into another by checking out the branch he wanted to merge FROM and typing "git merge branch_to_merge_to", which had the disastrous result of silently doing the exact OPPOSITE of what he was trying to do. At which point he would happily push to origin. This would result in a lot of lost time, especially if we didn't catch it right away. When you are already expending a lot of brain power on a ATG/ReD/PayPal integration project, you just don't have anything left for learning a new SCM.). So I thought about it and realized that it SHOULDN'T MATTER what branch you are on, you should just be able to tell Git what you want to happen (merge branch1 into branch2) and Git should intelligently DO IT and then put you back where you were. So I made it happen.
This project is under continual development. I add something new to it every week as I find a new Git task pattern that I can automate. It finally got to the point where I couldn't stand using Git without GitScripts, so I stripped out all of the company specific pieces and threw the whole thing up on GitHub. I'm hoping that much smarter people than me can take this code and run with it and make it even more amazing. See the project page for some very basic documentation (more to come, haha, as always...) or, better yet, pop open the github repository and view the "bash_profile_config" file to see all of the different commands (aliases) currently available.
Let me know what you think! Post any bugs/questions/feature requests on the project page please.
Updates – Tab Edit 1.4, Abandoning JS Console, Limeberry news

It's apparently Code Blitz week here at Chomperstomp.com HQ. We've seen 5 blog posts in the last week, and code commits to no less than 4 open source projects (plus tons behind the scenes that I won't talk about just yet, but some neat stuff is coming...)
I finally fixed the Tab Edit Chrome Extension. Update and click "Restore Defaults" and it will work again. Still working on the problem of it not persisting the favicon selection though.
I have officially abandoned work on the JS Console Chrome Extension. It's absolutely pointless. Just hold shift when you hit enter while using the native JS Console and you can get multi-line functionality. That was the whole point of JS Console, so once I discovered this, I abandoned the project. I forgot to ever let anyone know though, so this is me making it official. I've made notes in all other relevant places as well.
Limeberry is coming along just swell. I've made some major improvements today. Gradient history swatches that when you hover over you can retrieve previous gradient code. Ditched all the PHP based code in favor of JS. Gave ability to change the number of gradient stops on the fly without a page reload (still doesn't preserve your previous stops/colors). LOTS more work to come on this. The more observant of you may notice that I'm updating the URL on the fly as you make changes. Yes, that's right, very very soon you will be able to bookmark swatches you create (or email/IM links) so you can save/load swatches. This is the project I'm most excited about right now, so this will be getting some love over the next few weeks. I'm hoping to turn this into a really nifty tool and even plop down the $10 I need to get it it's own domain. I've possibly even got another dev on board to design the page (rather than it just being ugly as hell the way it is now). Much much more to come...
Updates – BASIC jquery ui tabs rotate documentation, a note on nodejs hosting, and a note on the re-design

nodejs, jquery ui tab rotate, and re-design. Just a few quick notes...
-
I'm actively working on documentation for the jquery ui tab rotation plugin. I've (finally) got a very basic working example up.
The plugin is stupidly easy to use:
$("#tabbedElement").tabs().tabs("rotate", 4000, true);
Note that you MUST first call tabs() before you can add the rotation with .tabs("rotate", [ms], [rotate]). Also note that as of right now none of those params are optional! You can also call .tabs("pause") and .tabs("unpause") to start and stop the rotation. You can instantiate a rotating element that starts as "paused" by passing in false for the [rotate] param.We use this plugin at FinishLine.com, and we are always on the most recent stable release of both jquery and jquery UI, which means that this plugin is nearly always guaranteed to work with the newest version of both. I'll be posting updates to this blog whenever there is anything to report. The plugin's official "homepage" is right here.
-
Node.JS is a server side implementation of JavaScript. It is basically PHP or ASP or [name your server side language of choice here] but with JavaScript. This fulfills Knuth's 3rd law, which states that any code that can be written will eventually be written in JavaScript, which fulfills Knuth's 4th law which states that Knuth's 3rd law will change languages every 10 years. In case you were wondering, Knuth's 2nd law is that a 12% improvement is easily obtainable and should not be marginalized, which compliments while nearly contradicting Knuth's 1st law, which states that premature optimization is the root of all evil.
ANYWAYS, I'm working on something FUN in node.js. If it works out, it's gonna be BIG. If not, you'll never hear about it again, lol. But that's not what I want to talk about. This is a quick note to make mention of the fact that if you are looking for a node.js server, they are out there. You don't have to roll your own. Check out no.de, or this stackoverflow question or this page on the project's wiki for hosting options.
-
And last but not least, you may notice that I have re-designed the blog. I'm now using a PREMIUM wordpress theme created by my good friends over at outerspiceweb.com. It's called Continuum, and it is spectacular. It is their newest offering.
I'm doing some work with it, so I installed it here to help me figure out how it works and debug and develop on it, but I like it so much I think I'll just leave it up. You too can have this rad-tacular theme by heading over to its page on themeforest.
- Oh, and one final thing. I am actually working on upgrading status-bar calculator for Firefox 4.0. I'm having trouble, I have no idea why it's not working, but when I figure it out there will be a write-up here.
Making Git show post-receive e-mails as an HTML color formatted diff

I wanted git to send me an e-mail with a color formatted HTML diff view of pushes/commits whenever the remote server received a push. After some digging I found that I could accomplish this using the post-receive email hooks in combination with Pygment's command line tools (using Python).
Prerequisites:
I will assume for this post that you have Git, Python and Pygments installed. It's been months since I installed Pygments, and I honestly can't remember *anything* about installing it, which means it was probably pretty straightforward and easy. You probably can just do this from your shell:
sudo easy_install Pygments
Making your Git repo send colored diff e-mails:
1. Setting up the post-receive hook
a. post-receive
The first thing you will need to do is configure your post-receive hook:
/git/your-repo.git/hooks/post-receive
In the hooks directory (cd /git/your-repo.git/hooks/) there will probably already be a "post-receive.example" file. Just copy it and rename it post-receive.
This file is basically a shell script. It is run after your repo gets a push and is updated. It is passed in 3 arguments: old revision hash, new revision hash, refname
All you really need to put in this file is the following line:
. ~/git-core/contrib/hooks/post-receive-email
What this does is calls another shell script "post-receive-email" and passes along the arguments (I think).
I'm pretty sure you could specify other shell scripts in the same way at this point if you wanted to.
b. post-receive-email
Now make the file you referenced from the post-receive file:
Move to your global hooks directory (the other one you were just in was specific to just that one repository, this one is the global hooks dir):
cd ~/git-core/contrib/hooks/
Create a file called post-receive-email. This is a shell script, but DON'T put ".sh" on the end.
Now, place the following code in that file (or, better yet, here's the file):
I'll try and point out some of the relevant portions of this script:
generate_email_header() (line 198):
This is the header of the e-mail, including the subject as well as the first few lines of the e-mail.
You may notice some variables here. ${emailprefix}, $projectdesc, etc. I'll talk a little about these later on.
Basically, what you need to know here is that if you want to change the e-mail subject or the beginning content of the e-mail, you do that here. You *could* hard code the recipients here, but don't. We'll talk more about recipients later.
generate_email_footer() (line 219):
This is the footer of the e-mail.
Notice that I placed a line here that tells you which files are causing these e-mails to be sent. I highly recommend keeping this line so that whenever you want to change anything about the e-mail, the e-mail itself tells you everything you need to know about doing so.
show_new_revisions() (line 605):
This is triggered if someone pushes up new revisions that have not ever been pushed up before. This way each code change will only be shown in one e-mail ever. This is the part that generates the actual diff itself and this is probably the single more important part oft his blog post. Lines 635 through 638:
git show -C --pretty=format:"committer: %cn%ncomments: %N%n%s%n%b" $onerev > gitlog.txt
export PYTHONPATH='/usr/local/lib/python2.4/site-packages'
pygmentize -O noclasses=True -f html -l diff gitlog.txt
pygmentize -O noclasses=True -f html -l diff -o gitlogemail.html gitlog.txt
Let's break it down line by line:
1. This is the actual git diff. If you just plop this down in your command line right now (minus the > gitlog.txt part) and replace $onerev with a sha1 hash from your log, you'll see a "preview" of how your e-mail will theoretically look. Here's some code for you to try to see what I'm talking about, do the following in your shell:
git log
Copy one of the sha1 hashes shown the log, then...
git show -C --pretty=format:"committer: %cn%ncomments: %N%n%s%n%b"
(so, for example, and don't try using this exact line because you won't have my sha1 hash in your repo so it won't work):
git show -C --pretty=format:"committer: %cn%ncomments: %N%n%s%n%b" 583038808efbde6fef4eb2e92dd2a920ba714eed
(hit "q" to get out of the diff view this throws you into)
If you don't like anything about this diff view, you can change it by editing the format:"...." part. See the git-show page in the git manual for details.
LOGBEGIN (line 656):
This is a constant (it's counterpart is LOGEND on the next line). The contents here will be used in the script in various places. It's content is placed before the diff to help separate the diff from the rest of the e-mail.
recipients (line 676):
You *could* hard-code e-mail recipients here, but DON'T, we'll once again talk about this in just a few moments...
emailprefix (line679):
emailprefix=$(git config hooks.emailprefix || echo '[SCM] ')
This specifies the text you want showing up right before the subject of the e-mail. It pulls in a setting from your gitconfig (again, we'll talk about this in a moment) but it also specifies a default in case you don't have one set. I make all my e-mails subject lines prepend with [GIT] so I know it's an automated git e-mail at a glance.
custom_showrev (line 680):
This line currently doesn't do what it looks like it does. At first line it appears that you can set your diff settings here, but this is actually unused at the moment. I was trying to make it so you could set your git-show settings in the git config, but I was having trouble getting it to work and gave up because I had bigger better fish to fry... So, don't be fooled into thinking you can change this line and have your e-mails be effected.
2. Setting your git config options
In the post-receive-email file, there were several variables that I kept saying I would talk about later. Now's the time!
We are going to set the variables in your git-config. I'm not 100% sure, but I suspect that this will allow you to have different settings per repository.
The way you do this is:
Move to your repository's home directory:
cd /git/your-repo.git/hooks/
At this point, you can dive right in and make new config settings, or you can list current settings. List current settings like this:
git config --list
To add new config settings:
git config --add blah.blah true
or
git config --add blah.blah "that is soo true dude"
or, better yet, just pop open the .git/config file in a text editor (git config -e) and add lines like this:
[blah]
blah = that is soo true dude
hooks.mailinglist
Whatever you put here will go in the "To:" field. (This is who the e-mail will be sent to).
git config --add hooks.mailinglist "ralphie@gmail.com, frank@gmail.com, steve@gmail.com"
Don't be fooled by the similarly named "hooks.announcelist" which, as far as I can tell, does nothing (theres a few lines of code that may use this if it isn't empty, but I haven't looked into this very far. Don't set it and it won't negatively effect anything. If you do set it, you may get unexpected results).
hooks.emailprefix
This is the text that will be inserted before the subject line. I like to set mine to [GIT] so I know it's an auto generated git e-mail by just glancing at the subject. If you don't set it, it defaults to [SCM].
git config --add hooks.emailprefix=[GIT]
Testing
Ok, at this point, you should be all good to go. Make a code changes, commit, push to your remote and sit back and wait on the e-mail.
Problems? I probably won't be able to help, but I'll try. Better to try asking on StackOverflow.com.
Good luck!
Git it now?

Git is amazing. The problem is, it's hard for a lot of people to get git. Specifically the remotes part. If you are used to CVS or SVN (Subversion) you're probably used to the idea that when you "commit" something it just flies out to the server and sits there available to anyone else with access to that server. Git doesn't do this.
Git is a distributed version control system, which means you have the entire project and the entire history of the entire project (or at least the branch you are on) sitting on your machine when you checkout the project(branch) from the server. So, when you "commit" something, you're really just creating a new version (kind of like timestamping a state of code and saving it) on YOUR machine. The remote server knows nothing about it. A lot of people new to git mistakenly think that "add" sort of saves a version of something on your machine and then commit sends it out to the server. Not so.
To help, I've created this image:

add: This takes the "work" off of your "work bench" and puts it on the "loading dock" (index).
commit: This takes everything on the "loading dock" (index) and puts it in a "crate" (commit) and places it on the "truck" (history).
push: This tells the "truck" (history) to drive itself to the "warehouse/hub" (remote) [and drop off copies of everything and come back] .
stash: This takes everything on your "work bench" and places it in a "box" (stash) on the side.
ssh-askpass in Aptana with git project on OS X
I recently downloaded Aptana on OS X Snow Leopard because I know of no other free good IDE. I had a project set up under Git that I was trying to work with and I discovered that if I went to "import" I could select "Git" and pull in a remote repo right into Aptana. Amazing!
Only problem was I hadn't set up my RSA keys so Git was still asking for my password. Aptana requires a little program called ssh-askpass. After a little Googling I found a scary looking script that was specific to mercurial, but works for pretty much anything aparently.
It turned out to be really easy and worked like a charm. Here's what I had to do:
1. Open up a Terminal
2. Enter the following command:
sudo vi /usr/libexec/ssh-askpass
3. Copy and Paste in the following code:
#! /bin/sh
#
# An SSH_ASKPASS command for MacOS X
#
# Author: Joseph Mocker, Sun Microsystems
#
# To use this script:
# setenv SSH_ASKPASS "macos-askpass"
# setenv DISPLAY ":0"
#
TITLE=${MACOS_ASKPASS_TITLE:-"SSH"}
DIALOG="display dialog \"$@\" default answer \"\" with title \"$TITLE\""
DIALOG="$DIALOG with icon caution with hidden answer"
result=`osascript -e 'tell application "Finder"' -e "activate" -e "$DIALOG" -e 'end tell'`
if [ "$result" = "" ]; then
exit 1
else
echo "$result" | sed -e 's/^text returned://' -e 's/, button returned:.*$//'
exit 0
fi
4. Hit "esc"
5. Type ":wq" and hit enter
6. Issue the following command:
sudo chmod +x /usr/libexec/ssh-askpass
Now you should be able to start over on the import and have it work perfectly. A little dialog box will pop up and ask for your password. It's asking for the password that goes to your remote repository (that you normally have to type in the shell/terminal when you interact with your git repository).
jQuery UI Patch Landed!
I'm now an official contributer to the jQuery codebase (well, jQuery UI).
This is my first real code contribution to a major open source project. Kind of exciting.
Granted it was only one line of code (started as around 15 lines, but we got it narrowed down to just the one) but it was a big problem for my website (and several other sites) and it took some detective work to track down what the actual issue was.
POOF – Recursive Directory Listing in Python
I've begun working on a new project, POOF (Project Orphaned Object Finder). It searches through a directory and all sub-directories to detect files that are not referenced by any other files, or not referenced by a file you target or any of that file's targets etc. Basically, looking for unused or orphaned resources in a project of any language (but JS/HTML/CSS to start).
Tonight I worked on getting the directories listing recursively.
I'm sure there's some sort of built-in function or UNIX function I could call or something like that, but half of my goal with this project is learning Python, so, yeah. I wanted to do this one by hand.
General overview of my approach:
I made a function "listDirectories" which you pass three arguments to; directory, tabStops, path.
The directory is the directory you want to go to.
The tabStops is how many tabStops you want to display before the directory listing.
The path is the path you are coming from.
The function calls itself each time it encounters a subdirectory. You start the whole thing off with a hard-coded seed. The next step is to un-hard-code this seed so you can pass the seed values in from the command line, or just call the program from your current directory (which is how you will kick off the whole thing when this project is complete). Something like:
POOF.py -d=directory
or
POOF.py
or
POOF.py -d=directory -t=\t\t -p=C:\Projects\POOF
This will of course need to be ironed out because that third one looks UGLY.
Here's the current iteration of the code. Keep in mind this is my first real Python program:






