Sequel Pro — Open Source Mac OS X MySQL GUI

For those of you that run MAMP or your own custom build of a web server on your local machines it’s handy to have a utility to manage your databases. I like phpMyAdmin but lets face it, it stil uses iFrames and is relatively ugly. Sequel Pro is beautiful.

As most of these projects are these days — you can check it out on Google Code, here’s a direct link to download the latest version of Sequel Pro as of this posting.

I’m using it currently, and I love it. Much more responsive than phpMyAdmin.

Not sure about the whole “Sequel” thing but, I do have friends that pronounce it “MySequel” which is retarded, but to each his own.

Later,
Bryan

How to install Git on Mac OS X (Leopard, Snow Leopard)

First you need 10 pounds of thermite, a magnesium ribbon… Wrong window.

It’s not science, or even computer science. This is what you do

  1. Peruse your way to http://code.google.com/p/git-osx-installer/
    (Here’s a direct link to  the latest Git OS X Installer. Uploaded of September 17th, 2009. V1.6.4.4… Good lord. I’ll let you know when version 5 comes out. I kid, I kid.)
  2. Open it.
  3. Run the git-1.6.4.4-intel-leopard.pkg (A basic installer. Note: You’ll need administrative privileges.)
  4. Complete the Installation
  5. Open up a terminal
    1. Change directories to the mounted image
      bash$ cd /Volumes/Git\ 1.6.4.4\ Intel\ Leopard/
      bash$ ls
      README.txt                    setup git PATH for non-terminal programs.sh
      git-1.6.4.4-intel-leopard.pkg            uninstall.sh

      bash$ ./setup\ git\ PATH\ for\ non-terminal\ programs.sh
    2. Run the shell script (last line above)

Re-open your terminal (reset your session) and you’ll be good to go. Up and running with Git in no time!

Would like to extend a very heart thanks to the people over at the Google Code page. Specifically Tim Charper, whoever you are — thank you for your good work!

That’s it. There’s nothing else to do. You’re f$#%ing done.

Peace,
Bryan

Crainbandy Labs: Custom Torrent Search Engine

I’ve been working on building a custom torrent search engine because I (hate) looking for torrents on current sites/sorting by seeds/going to another site to see if they have my torrent/googling for it + “torrent” keyword… It’s getting ridiculous and somebody needs to put a stop to it. Somebody like me.

As a side note I am introducing Crainbandy Labs ™ to the mix of things to check regularly. Eventually it will be a 100% fully functional CMS for me to control projects in the labs with demos, documentation, comments, etc. Maybe even a donate button? Who knows it could get crazy. Obviously this blog is not a breadwinner as of yet though so for now everything’s free. Oh joy.

Check it out, and don’t break anything.
http://www.crainbandy.com/labs/torrents/

Happy Torrenting.
Bryan

How to fix Trailing whitespace during Git commit

Git uses hooks to fire certain actions at certain times. The “post-commit” hook fires … If you don’t understand what the hooks do after reading the hook file name itself turn off your computer and go to sleep.

You can look in there it’s in your .git/hooks folder in your repository.

There are times where this is useful probably, but I can’t think of a single one so I’m just going to tell you how to get rid of it because it really is a pain in the ass.

Fix the Trailing Whitespace during Git commit message

[bryan@crainbandy sites]# mkdir testdir
[bryan@crainbandy sites]# cd testdir/
[bryan@crainbandy testdir]# git init
Initialized empty Git repository in .git/
[bryan@crainbandy testdir]# cd .git/
[bryan@crainbandy .git]# ls
branches  config  description  HEAD  hooks  info  objects  refs
[bryan@crainbandy .git]# cd hooks
[bryan@crainbandy hooks]# ls
applypatch-msg  commit-msg  post-commit  post-receive
post-updatepre-applypatch  pre-commit  pre-rebase  update
[bryan@crainbandy hooks]# rm -rf *
[root@crainbandy hooks]# ls
[root@crainbandy hooks]#

You’ll probably read all kinds of crap about this but the fix is to simply remove all of the files in your .git/hooks directory.

Happy rm -rf’ng.
Bryan

PHP function that strips all non alphanumeric characters

Sometimes it’s necessary to only return alphanumeric characters in a PHP script.

Whether you’re trying to upload images and get a uniform name for your image, or you just need to get a key you can hash with an obvious solid value then this function is for you. This function is the fastest, most reliable way I know of to return just alphanumeric characters in PHP.

The function

// GET ALPHANUMERIC
function return_alphanumeric($string) {
return preg_replace('#\W#', '', $string);
}

Oh boy,
Bryan