Creating Git Aliases
I create shortcuts for everything. I create variables which act as text shortcuts, shortcuts in TextMate to generate CSS/JS/HTML, and bash scripts so I don't have to type in the same commands over and over again. So why should version control software be any different? I commit and push religiously so I create Git aliases to save myself a few keystrokes.
#make "com" alias for "commit"
git config alias.com commit
#make "co" alias for checkout
git config alias.co checkout
#make "br" alias for branch
git config alias.br branch
# When you want to see just the differences of one function in one file in two different commits
git config alias.funcdiff '!sh -c "git show \"\$1:\$3\" | sed -n \"/^[^ \t].*\$4(/,/^}/p\" > .tmp1 &&
git show \"\$2:\$3\" | sed -n \"/^[^ \t].*\$4(/,/^}/p\" > .tmp2 &&
git diff --no-index .tmp1 .tmp2"' -
These are just some sample Git aliases. You can view more detailed (and by detailed I mean brain-numbing) examples of git aliases at the Git Wiki.
Two years ago I documented my struggles with Imposter Syndrome and the response was immense. I received messages of support and commiseration from new web developers, veteran engineers, and even persons of all experience levels in other professions. I've even caught myself reading the post...
Sooner or later you'll run across a regular expression. With their cryptic syntax, confusing documentation and massive learning curve, most developers settle for copying and pasting them from StackOverflow and hoping they work. But what if you could decode regular expressions and harness their power? In...
UPDATE: The jQuery website was down today which caused some issues with my example. I've made everything local and now the example works.
Earlier this week, I posted a MooTools script that faded links to and from a color during the mouseover and mouseout events.
This post is a proof of concept post -- the functionality is yet to be perfected.
Picture this: you've found yourself on a website that uses horizontal scrolling instead of vertical scrolling. It's an artistic site so you accept that the site scrolls left to right.