Posts  

Bug with Adobe Flash on Mac when uploading files to a redirected URL

0 Comments | Trackback - September 24, 2008

Just spent almost the entire day trying to figure out what I was doing wrong when trying out many different flash multi-file uploading widgets. All of them would give me a 302 redirect http error, even when testing locally.

So after much searching and reading and studying… and finally testing this on my Windows machine (which works fine); I’ve decided this is a bug in Flash 9 for Mac.

There’s not a problem when it’s uploaded to a script directly which returns a 200 OK header response first. But when you use a framework that uses mod_rewrite for every URL, it’s not easy to get around that.

If anyone else has had experience with this I’d love to hear from you. Very frustrating! Maybe it’s fixed in the Flash 10 beta? Maybe it’s not a bug; it’s a “feature”, right?

UPDATE: I went ahead and installed Flash10 hoping for the best, but with no luck. I was able to contact someone at Adobe who told me the Flash scripts will have to be recompiled in Flash10 to see if Flash10 would help. So installing Flash10 on my computer won’t make the scripts any different.

Published in: Flash, Mac, Programming, WebDev

Launched a site today!

0 Comments | Trackback - September 22, 2008

I’ve been developing a site this weekend and decided to go ahead and go live with yipURL.com with basic functionality. It’s yet another URL minimizer, but I do have unique things in the works for it! Try it out and give me your feedback!

Now off to get some sleeeep!

Published in: Programming, Software, WebDev

Redirect all but used subdomains to primary domain using mod_rewrite and CodeIgniter

0 Comments | Trackback - September 21, 2008

I was recently playing with mod_rewrite and wanting a couple of subdomains to act as subdomains, but all others to redirect back to my site without the leading “www”. For example:

www.example.com => example.com
bad.example.com => example.com
api.example.com => api.example.com

Not being a regular expression or mod_rewrite expert (or any resemblance of such), this was a bit of a challenge. But I did it with the help of a mod_rewrite and regular expression cheat sheet, as well as the excellent Apache URL Rewriting Guide.

So here it is for anyone else that could benefit. Just replace the bold parts with your own subdomains (and example with your domain).

Redirect without leading www:
# Redirect deleting leading www to root domain if no specified subdomain is used
RewriteCond %{HTTP_HOST} !^(subdomain1|subdomain2)\.example\.com$ [NC]
RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]

Redirect with leading www:
# Redirect adding leading www to root domain if no subdomain is specified
RewriteCond %{HTTP_HOST} !^(subdomain1|subdomain2|www)\.example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]

If you’re using CodeIgniter and mod_rewrite for pretty URLs, you’ll need to be sure to add these subdomains to the list of directories that can be accessed directly.
# CodeIgniter writing
RewriteCond $1 !^(index\.php|images|robots\.txt|css|user_files|subdomain1|subdomain2)
RewriteRule ^(.*)$ /index.php/$1 [L]

Published in: Programming, WebDev

Serving a large file through PHP without hitting memory_limit

0 Comments | Trackback - September 10, 2008

Ran into a little problem hitting the memory limit for PHP when serving 100MB+ files through a script like:

$file = @fopen($filename,"r");

if ($file)
{
while(!feof($file))
{
    print(fread($file, 1024*4));
    flush();
    ob_flush();
}
@fclose($file);
}

Found that you need to call ob_flush() as well as flush() since flush() has no effect on the buffering scheme of your web server.

Just thought I’d throw that out there for anyone else.

Published in: PHP, Programming, Uncategorized, WebDev

Mozilla Labs Ubiquity

0 Comments | Trackback - September 1, 2008

Now this looks cool! Ubiquity from Mozilla is looking to connect “the Web with language in an attempt to find new user interfaces that could make it possible for everyone to do common Web tasks more quickly and easily”.

Check it out!


Ubiquity for Firefox from Aza Raskin on Vimeo.

Published in: WebDev

iTunes Using 1.2GB+ of Memory?

0 Comments | Trackback - August 20, 2008

I recently had a chance to upgrade my iMac to the 2.8Ghz 24″ with the 800Mhz memory. I had 4GB of the 667Mhz memory on my previous iMac and never had problems with running out of memory. However, here’s my memory usage when playing music on iTunes using the shuffle mode with the cover flow on:


And here’s my memory usage just moments after I close iTunes:

Crazy! I did order 4GB of memory just yesterday so hopefully that will put me back where I was with my previous iMac.

Published in: Apple, Apps, Hardware, Mac, Software

Pownce, Twitter, Tumblr, Jaiku, Oh My!

0 Comments | Trackback - April 26, 2008

There’s a growing number of these micro-blogging services. And while I’m signed up for all of them except Jaiku, I still don’t know which one to use primarily. I’m now also faced with the question of which one should I use for one of our websites to post more incremental updates that people can subscribe to.

I’ve been looking for a complete solution; an app that will post to all of them at the same time. And while someone has found something of a solution, it’s not a preferred method by any means.

Twitter seems to be the most popular though I’m not exactly sure why. Perhaps cause they were there first? I personally like the Pownce format; especially with Leah’s latest API release. But Tumblr offers a lot of options too like text, links, quotes, chats, photos, video; but no files (Pownce offers sending files).

And while it seems like there’s a lot to consider with four different main players, a year ago someone found as many as 111 Twitter look alikes internationally.

Published in: Apps

SocialThing Invites

4 Comments | Trackback - April 18, 2008

I was lucky enough to get a SocialThing.com invite from Dan Taylor, so I have some invites of my own now. Let me know if you’d like one!

Published in: Apps

MultiTouch Trackpad Gestures For The Rest Of Your Apps

0 Comments | Trackback - April 12, 2008

If you’re one of the lucky ones to be able to get one of the latest MacBooks with Multi-Touch, you’ve probably asked the same question I have: “How can I get Firefox to use the swipe gesture to go forwards and backwards like Safari does?”

Answer: MultiClutch

This neat little Preference Pane addition will allow you to associate trackpad gestures with keyboard shortcuts; per application.

So this gives you exactly what you’re looking for: navigation for Firefox 3 (beta) via trackpad gestures. Only apps built with Cocoa are supported right now, so this won’t work with Firefox 2, sorry!

If you found that app useful, please consider making a small donation to Will! It helps make the world go round. =)

Published in: Apps, Hardware, Mac, Software

MacBook Pro and Gaming

0 Comments | Trackback - April 10, 2008

I used Boot Camp to make a little partition to dual boot into Windows XP SP3 on my MacBook Pro… and seeing how I have an nVidia 8600M video card with 256MB of dedicated memory in this little notebook, I thought I’d try out Day of Defeat: Source (I’m a semi-regular on a server there).

It was great (other than I didn’t have any sound). I was getting a regular 60-80fps. But it wasn’t long (1 minute?) before I heard the fans starting to spin up (apparently I’ve never had them go full speed before) and I could feel the heat through the keyboard.

So I lifted the MacBook up to feel the bottom which was now HOT. Easily 3 or 4 times hotter than it is under normal operating.

I quickly exited the game and the fans calmed down within a minute or two. And while it may work well for gaming… it doesn’t work well for gaming. There’s no way that much heat can be good for it. So while the power is there if I need it (video editing, photoshop, etc); it’s not there for gaming.  I don’t even want to imagine the toll playing a game like that would take on the battery if I weren’t plugged in.

Anyone else have a different experience or opinion?

Published in: Hardware, Mac