Side Scrolling Revolution

I’ve been going through a side scrolling revolution lately. If you have an iPhone or iPad, you should check out ‘hook champ’ and the new ‘super quick hook’, both by rocketcat games.

On the wii I’ve been playing ‘bit-trip runner’ the fourth game in a series of awesome music (chip tune) games by gaijin games. I also have ‘bit-trip beat’ and ‘bit-trip core’, but I think ‘runner is the most accessible. Maybe tied with ‘beat’.

Network Solutions and htaccess files

I just finished a site for a friend/client – http://amyrothphoto.com

The site is hosted on network solutions, and we were having trouble getting the site set up. The first problem was importing the database. We have all the content and photos stored in a database, and that ended up being about 20MB. Unfortunately Network Solutions’ installation of phpMyAdmin only allows for .sql uploads of up to 8MB. This is actually a problem that I run into frequently. Now I know phpMyAdmin has some settings where you can tell it an upload directory, but on a shared host using their installation of phpMyAdmin, it’s kind of hard to get to – if it’s possible at all.

Enter the best (worst) named script I’ve ever found – bigdump.

Bigdump allows you to upload large sql files by configuring it with your db info, and then putting that and the sql file up into the same folder. You then just click a button and it imports it and you’re done!

That led to another issue. I went to load the site and up pops an Internal Server Error #500. What to do!?

Well I know that the site worked on my local computer, and that it worked on my dev server too. So I turn off the .htaccess stuff, and the site loads. OK so it has to do with the .htaccess file – which I know works. So I google “network solutions .htaccess problem” and it brings me to this article. Basically for Network Solutions to work correctly with the .htaccess file I had to add the line:

RewriteBase /

And there we go!

Bike Riding with technology: TrailBlazer for the iPhone

I’ve been bike riding for a few years now, slowly getting new gear and equipment as my abilities increased. I find bike riding a good blend of exercise and geeking out on gear. I enjoy riding and seeing the sights, and getting outside is always nice. And getting new toys to put on my bike is always fun too.

So yesterday I put my aero bar back on my bike, I don’t remember why I took it off (here’s an article on why I might have, stability is an issue), but I recently read that using an aero bar is good for your core, so I decided to try it out again.

I also decided to try out an iPhone app called Trailblazer (iTunes web link). Jeff found this one and said it was pretty cool, so I grabbed it, since it’s free it can’t hurt!

Trailblazer basically records your GPS position during your bike ride. It also has other features like iTunes control, and charting where you are on a map (would be useful if you got lost), speed graph, and altitude graph. None of those were particularly useful to me since I keep my iPhone in my pocket while riding. But I’d love to get a handlebar mount in the near future.

To compare what data Trailblazer provides, I’ll compare it to the bike computer I use, a Sigma 1606. I just set this up again when I replaced the battery, so I know that the wheel settings and all that crap are correct.

So the results, from Trailblazer – They give you this fancy map:

The usual_Map.png

From this map you can see that Trailblazer thinks I rode for 1:04, went 14.7 miles, had an average speed of 14mph, and a top speed of 19mph. Unfortunately the only thing correct about this data is the time it took. The other data isn’t totally wrong, it’s just lower than what the bike computer says. My bike computer reports that I rode for 1:01, went 15.57 miles, had an average speed of 15.13mph, and while I didn’t clear out my old max speed, I know I was going above 19mph at various times during the ride, I know I saw 21mph at least once.

But what about the charts that Trailblazer gives you? Well I couldn’t find a way to look at them on the phone, but Trailblazer offers a way for you to export the ride, either emailing it to yourself, saving it as a set of pictures, or uploading it to facebook. I couldn’t get the facebook export to work until the next day, but I’m going to assume that’s an issue with my phone, and not the app. When I emailed myself the ride, the charts came with it.

The usual_Plot.png

Now the speed plot I would just throw in the garbage. Maybe it’s because the phone was in my pocket so it’s accelerometer was all over the place, I don’t know. Either way it’s wrong.

The altitude one also seems weird. I mean, I start and end at the same place, so shouldn’t the altitude at the start and end be the same?

Probably the coolest feature of Trailblazer is the export data as a KMZ file that you can then import into Google Earth. I don’t know why it’s cool, but it is. I imported it and then just scrolled around it for a few minutes saying “yeah i was just there”. haha.

One last note, I rode for an hour, and my iPhone battery was pretty much full when I started. When I ended it had been drained by about 50-60%. I know the GPS drains your battery, but I was also playing music the whole time, so I’m not sure how much more of an effect that had on the battery. This could be an issue for people who ride longer than an hour or so.

All-in-all, Trailblazer is free, so even if the only thing you use it for is to map your ride, then it’s worth it.

I enjoy bike riding, but I also enjoy looking at what I’ve done, what I’ve accomplished, where I’ve been, so any piece of hardware or software that helps me do that I’ll try out.

Stair Repair

After our water heater blew up, the stairs going into our basement were disgusting, so I fixed them up!

Posted in Uncategorized

Importing large databases into MAMP

I needed to import a large (~400MB) db for local testing. I did a mysqldump on the server, zipped, and then ftp’d it to my local machine where I was going to poke around with it using MAMP. However when I tried to import it via the command line, it would barf eventually with the error “ERROR 1153 (08S01) at line 988: Got a packet bigger than ‘max_allowed_packet’ bytes” message. Here’s how to fix it.

In Terminal cd to mamp’s bin folder:

cd /Applications/MAMP/Library/bin/

try to import the database:

./mysql -u username -p database < /path/to/file_to_import.sql

you’ll probably get an error like:

ERROR 1153 (08S01) at line 988: Got a packet bigger than ‘max_allowed_packet’ bytes

What you want to do is fix the ‘max_allowed_packet’ size in the my.cnf file. But where is it in MAMP? It’s actually nowhere. There are a few sample files that you can use and then copy to a certain directory. I got that info from http://forum.mamp.info/viewtopic.php?f=2&t=6306#p12075

I copied the conf (my-large.cnf) file from /Applications/MAMP/Library/share/mysql to /Applications/MAMP/db/mysql/

Rename it my.cnf

Edit the settings as needed (username, password, port)

I needed to change the port from 9999 to 3306
And I bumped up the max_allowed_packet size to 64mb just to make sure it really imported the file

Save my.cnf

Restart MAMP

Retry the import command

It should work. If not, try bumping up the max_allowed_packet size again. You can always lower it when you’re done.

WAMP and osTicket

I have recently been trying to set stuff up locally on my windows laptop to mess around with some things. For the server set up I’m using WAMP (Windows, Apache, mySQL, PHP). Some of the software I’m messing around with locally are WordPress, Magento, osCommerce, Drupal, and osTicket.

All but osTicket were an absolute breeze to install, download, set up the DB, install, and start playing.

osTicket was a total pain though, first off, they only use the php short tags – <? and ?> instead of the “regular” tags – <?php and ?>. This issue is immediately apparent when you start setting up osTicket and all the form fields are filled with php code! Luckily the fix to this was easy – all I had to do was enable “short_open_tag” in the php.ini to “On”.

The php.ini file is located in your WAMP directory in the “bin/php/php5.2.6″ folder and for me it was on line #131. Obviously your php version might be different, but there’s only one folder in there so it shouldn’t be hard to find.

There’s also another php.ini file located in the “bin/apache/apache2.2.8/bin” folder. Again though the “short_open_tag” line is on line #131.

Once you have that you’re halfway there. If you’re using WAMP you’re probably as lazy as me and haven’t changed the default username and password to the database, ie it’s “root” and there isn’t a password defined. osTicket REALLY REALLY wants you to have a password, but there are two places you can change the code to remove that requirement.

The first place to remove the password requirement is in the setup script. The setup script is located in your osTicket folder, in the “setup” folder. Edit the file “index.php” and on line #53 change the line from:

$f['dbpass']    = array(‘type’=>’string’, ‘required’=>1, ‘error’=>’password required’);

To:

$f['dbpass']    = array(‘type’=>’string’, ‘required’=>0, ‘error’=>’password required’);

We changed the ‘required’=>1 to ‘required’=>0 there, just incase you missed it.

OK, the next change we need to do is sneaky, osTicket checks whether or not there is a database password defined in the function to connect to the database. Why they do this I have no freaking idea, this is what took me forever to find, and totally irritated me!

To fix the database connection function, in your osTicket folder, go into the “includes” folder, and then open the file named “mysql.php”. On line #21, change the code from:

if(!strlen($dbuser) || !strlen($dbpass) || !strlen($dbhost))

To:

if(!strlen($dbuser) || !strlen($dbhost))

So here all we did was remove the “|| !strlen($dbpass)” code that checks for the database password. Ridiculous.

And there you go! You should now be on your way to ticketing fun on your windows computer! Enjoy!

Greatest order confirmation ever

If this isn’t a reason to buy something from Freitag I don’t know what is.

Pasted with typo’s and all:

Dear Jason of idyllic North Haledon your Ordernumber is:

We’re honered to announce that you soon will be proud F51 DALLAS owner. We do everything within and beyond our power to make sure that in no time a charming delivery man will ring your bell to hand over your personal piece of FREITAG!

Later this evening we’re going to celebrate your shopping skills till dawn and we will drink at least 17 times to you. Therefore again, thank you very much!

Best regards
Your FREITAG Online Team

Usual delivery times (F-cut excluded):
Switzerland: 2-3 days
EU-Countries: 5-8 days
Rest of th world: 10-15 days

Posted in Uncategorized

Deadpool 2009

Because being morbid is fun sometimes.

1 Artie Lange
2 Fidel Castro
3 Patrick Swayze
4 Elizabeth Taylor
5 Steve Ballesteros
6 Margaret thatcher
7 Kirk Douglas
8 Dick Clark
9 Mary-Kate Olsen
10 Amy Winehouse

Looking over last years list I think the only person that I picked was Charleton Heston.

We’ll see what this year brings.

Posted in Uncategorized