Chomper Stomping jQuery/JavaScript/CSS 3/HTML 5, Java/PHP/Python/ActionScript, Git, Chrome/Firefox Extensions, Wordpress/Game/iPhone App Development and other random techie tidbits I've collected

31May/111

Introducing GitScripts

octocat

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.

28May/110

Updates – Tab Edit 1.4, Abandoning JS Console, Limeberry news

tabedit

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...

14Dec/090

JavaScript Console v0.0.1

jsConsoleSS

So I just made this little extension for Chrome.

There were some pretty convoluted to gymnastics I had to go through to get the console on the page and get it to execute the JS I wanted it to execute. Pretty much the only hook you have it an onClick (from what I can tell). They've got it locked down TIGHT.

This needs a LOT of experimentation done, but it looks like you can use it to define functions on the page through the console and call those functions. However, the functions do NOT persist. So, you can do:

function test(){
alert('test');
}
test();

and "execute js" and an alert will come up and say "test".

But you can't do:

function test(){
alert('test');
}

and "execute js" and then:

test();

and "execute js" and expect an alert to pop up.

I'm sure there are many sound reasons for this from a security standpoint, but it's annoying as hell to try and program for. It would be great if I could fix this and I have a few ideas as to how I can do that...

The main reason I'm making this is basically as a prototype/POC for the Status-bar Calculator port from FF since I'm going to have to do some very similar things to get the Calculator to show up in the bottom right hand corner (like this does).

EDIT: After publishing the extension, it was pointed out to me that Chrome already *has* a JavaScript console if you hit Ctrl + Shift + J. However, that console only allows single line input, whereas this allows for as many lines as you want, making this just a *little* more functional. It would be awesome if I could find a way to hook this console into that console.

Checkout the project page.

9Dec/090

Chrome Extension – Status-bar Calculator v0.1.9

So I ported the Status-bar Calculator over to Chrome. It took me a little under 2 hours.

Chrome extensions are shaping up to be a gagillion times easier to create than FF extensions were back when I started doing them four years ago. I actually re-wrote the entire thing from scratch. It functions completely differently, relying entirely on the eval() function to do all of the math (where the FF version jumps through some crazy hoops).

The Chrome version has something I've wanted for a long time: history.

It's not persistent yet, but while you are in a "session" the equation history keeps building below the box so you can see where you've been if you are plugging away at a list and lose your place.

As with the FF version, it's MIT license. Steal it, or hack on it and contribute back to me (I'll definitely credit you and much appreciate it).

You can check out the source code here or on Etherpad here.

I'm looking forward to really fleshing this thing out and making it rock for whenever extensions make their public debut in Chrome. Oh, yeah, btw, you have to install the developer beta of Chrome to get extensions...

21Mar/080

Status-bar Cloninator

So, I was a little dismayed to see that someone else had started a competing calculator extension for my Firefox calculator extension. Then, I realized they are my evil twin.

Let's start with the names of the extensions. Mine:

Status-bar Calculator

Theirs:

Status-bar Scientific Calculator

hrm...

Now lets look at the extensions:

Mine:

Theirs:

ok. Now let's evaluate the extension itself. Mine is a little calculator icon that sits in the browser. When you click it, it expands to reveal two textboxes that can be used for simple math and dec/hex/bin/oct conversions. Thiers is a little calculator icon that sits in the browser. When you click it, it expands to reveal one textbox that can be used to type in math equations and do dec/hex/bin/oct conversions.

Darn. Theirs is better. Crap.

Let's go ahead and add some insult to the injury. Here is the description for my extension:

It's a tiny calculator icon in the status bar. Click it, to expand it and use it. Click the '+' to change to '-', '/', or '*'. Click '=' to get the answer (output to the first textbox). Or, if you don't like to use the mouse, you can use the +, -, *, /, ^, =, and ENTER function keys to do the calculations instead (just like a calculator). Click the calcultor icon to shrink it to just the icon when not using it.

Here is the description for theirs:

It's a tiny calculator icon in the status bar. Click it, to expand it and use it. Enter the expression to calculate and hit enter to evaluate.

Wait... no... did they really just cut and paste my description??? Must have. There is no other possible explanation. Ok, so now let's look at our websites. Take a look at mine, and now take a look at my evil twin's. Notice anything? How about the big fat scrolling code in the background?!?

HE EVEN HAS THE SAME STUPID HAIRCUT AS ME!!!!

Why, Sunny, WHY???