Daily Links
That can be my next tweet!
This little service generates your next tweet based on previous ones. Sometimes generated tweets may be more creative then your own.First human in space
50 years ago, Yuri Alekseyevich Gagarin became the first human being to go into space.re35 - April Fools That Might Yet Become Real
Aside from the obvious that there are millions upon millions of analog cameras collecting dust, this idea is amazing. If, and big IF here, they can pull off something that actually replaces rolls of film with digital, they will make a fortune. Obviously it would have to compete on price, but man, think of the possibilities. (via Coudal)Daily Links
Alice in Chains play Winnipeg for the first time this August
Alice in Chains / Evanescence / Sum 41 Headline the Yearly festival at Winnipeg Stadium in August 2011Inflatable Crowds
Meet the Inflatable Crowd, a range of hireable dolls that have been used in movies like The King's Speech and The Fighter.The Cicada Principle and Why It Matters to Web Designers
A very well structured article about how nature can be an inspiration in web design.Adobe Subscription Plans
Adobe has adopted a subscription plan for its Creative Suite products, allowing users to effectively rent some or all of the product range on a monthly basis. Or, if you prefer, World Of Adobecraft.IKEA's US Sweatshop
Boing Boing shedding some light on the working conditions of IKEA plant workers in the USA. Holy sweatshop.NDP Roll Out Their Platform Plan for The Internet
The best points are highlighted nicely on Michael Geist's site. My favourite, "We will enshrine “net neutrality†in law, end price gouging and “net throttling,†with clear rules for Internet Service Providers (ISPs), enforced by the CRTC;". That is pretty damn compelling. It might be NDP for me this time around.Daily Links
50 Cityscapes for Your Desktop
Nice collection of some amazing cityscapes. I've now got Gotham under my email space. Total chaos deserves total chaos.Lorempixum
A clever way to get a variety of placeholder images, but I think we still prefer PlaceKitten ;)Record Books
What if your favourite albums were re-imagined as book?Password Protected ZIP Archive on OS X
To Future Me,
So here I am assembling some semi-private documents on my MAC. To be a nice person, I figured I should ZIP up the files to save a little bandwidth, as my plan is to email this bundle to a contact. Not a problem because OS X has a built in archive tool. Just right click (ctrl click) the folder of files and choose make archive from the list. Voila, a ZIP file!
To be an even nicer person, I figured I should add a thin layer of protection to the ZIP file with a password. Hmm... how the heck do you do that in OS X? No options are presented when you use the context menu. A quick Google search turned up Stuffit, which is a bloated bit of software for what I am actually trying to do. Rather than waste time, I turned to the trusty command line.
Since zip is built into Linux, it should be hanging out waiting for something to do. Sure enough, a quick command does the job. Let's look at it.
# zip -re zipped-me.zip zip-me/
The above command does the following:
- run ZIP at the command line
- -r means go through the target folder recursively
- -e tells ZIP to encrypt the final zip file. In this case that file is "zipped-me.zip"
- zipped-me.zip is the archive that ZIP will make
- zip-me/ is the folder with which I will make my archive
- during the archive process, ZIP will ask for a password. Provide it twice and you are done!
Run the following command in the terminal if your archive utility won't recognize the password. Which the default setup fails at.
# unzip zipped-me.zip
Obviously replace the name in the above command with the proper file name.
TaDa!
Note: If you are not using the awesome and free Unarchiver Utility instead of the default setup, you should be!
Note 2: I'm throwing in the usual caveat here. If you DO NOT know where the command line is located in OS X, or it scares you, this article has nothing of value for you. If you choose to use the above command, we can't be held responsible for any damage, loss, corruption, etc... of your files, pictures of kittens, or anything else. This is advice on the internet. Use at your own risk.
Daily Links
Chromeography
"In praise of the chrome logos and lettering affixed to vintage automobiles and electric appliances — those unsung metal emblems and badges that are overlooked, forgotten, damaged, lost to time or the dump."Map Of A Tweet
I had to delve into this when setting up comments for Visual Lizard. This diagram would have been extremely handy back then. :)Fuck you. Pay me.
Mike Monteiro, Design Director, and co-founder of Mule Design Studio, was a speaker on March 25, 2011 and was sponsored by Happy Cog and Typekit (who also hosted the event at their office in the Mission).Commodore 64
I had one of these when I was a kid. Nostalgia senses tingling!CSS Pattern Generator Using Base64
Show us how to make repeating background images with CSS and base64 and we might follow you home. I'm going to try and figure out a practical use for this and build something! :)Atari's Greatest Hits
Thats right. The games from your childhood, redone to work in iOS. Full bundle of 100 games is $14.99 US. I think between myself and my brother, we spent more than 20 times that amount as kids acquiring new games. Also lots of the games include a bluetooth mode so you can play against a buddy. Downloading now!Open Compute Project
Facebook is open sourcing their server and data center information.Daily Links
Gnome 3
The GNOME Project has started from scratch and created a completely new, modern desktop designed for today's users and technologies.Realtime heatmap using node.js
Neat little tool to track clicks as they occur.What Does a Gig Cost?
Micheal Geist explains what gigabyte of data should cost. TL;DR 8 centsDaily Links
groupmeh
A revolutionary, game-changing social network for the tragically apathetic.ICT MxR Lab's Response to Google's Gmail Motion
Remember that Gmail Motion April Fool's joke?Tron Legacy Reconfigured
Daft Punk's amazing soundtrack remixed by Crystal Method, Paul Oakenfold, and M83. It's just out today.Daily Links
Google Scribe - SEO "experts" will be happy
New service from Google - autocomplete suggestions as you type.Manitoba Camp Sites Ready For Reservation
Entrance to all Manitoba Provincial camp grounds is free again this year.Tron Legacy UI
Josh Nimoy talks about his work on the movie's on screen user interfaces and some of the visual effects of the Grid.Metro
The free paper, the Metro, has arrived in Winnipeg. You can also catch the paper's news online as well.The Governator
I'm unsure if I should laugh or cry. Either way, doesn't Stan Lee have any shame? Is there nothing the Black Eyed Peas won't sell out for?Daily Links
A Big Ass Table
Inspired by this tweet from Mr. Hnatiuk, I googled for "where can you buy an MS Surfaces computer?" and ended up finding a pretty awesome parody ad. Enjoy.BoilerPlate Mobile
Want an excellent starting point for your mobile web app? Here you go! :)Uploading Very Large Files
Over the past few months, I've been working off-and-on to get an upload form working for very large file uploads. (In this case, very large means up to 1GB.) I'm still not done, but I've finally reached the "I think I have this mostly working" stage. So I figured I should write a bit on the problems I ran into, the tools I've tried out, and what I ended up doing.
Problems
INI Settings
The first issue I've had is that uploading large files using a PHP script requires increasing a number of limits set in php.ini. This pops up for any file larger than 2MB, since that's the default maximum file upload size for PHP. (Unless your host is already configured with a larger or smaller value.) Usually I can set these values by adding "php_value" statements to the .htaccess file, however in some cases php.ini needs to be edited directly.
The following values MIGHT have an effect on uploads. I'm not 100% certain, so if you know exactly when these settings could effect PHP allowing file uploads, let me know:
- max_input_time
- max_execution_time
- memory_limit
These values set limits on how long PHP can run (max_execution_time), how long it can take to parse the uploaded POST data (max_input_time) and how much memory it can use on the server (memory_limit).
The following values absolutely MUST be updated:
- post_max_size
- upload_max_filesize
These values are used to limit the maximum size of the POST data (post_max_size) and the maximum size of any single uploaded file (upload_max_filesize). Binary POST data is encoded in Base64, which makes it larger than the size of the file on disk. The POST data also includes any other form values submitted. This means that the post_max_size will limit the size of the file you can upload. I usually don't bother trying to figure out the math for how much bigger one should be than the other. Often I just double the maximum filesize I want to upload and use that value for both. Not perfect, but good enough. Since PHP will usually die without any feedback if the uploaded file is larger than upload_max_filesize, it makes sense to allow uploads of larger files than you want to allow. For Catalyst, we've implemented an upload behavior that will disallow uploads of files larger than a specified size, and provide an error message that the file is too large. This can only be done if the "too large" file was actually able to upload, though.
In my tests on shared hosting server, updating these values didn't help for files larger than approximately 128MB or 256MB (depending on the server). I suspect that this is due to additional security software preventing these uploads. The behavior was a bit odd. In my tests I already had upload progress meters working, so I could see when things stopped. On the servers that had this problem, files smaller than the magic limit would upload without issue. Once I went over the limit, however, a few megabytes would get uploaded and then the progress meter would stop completely. My coworkers would also stop complaining about having trouble accessing the internet, so it was clear that data was no longer being sent. I suspect that something on the server was closing the connection when it detected that the amount of POST data was bigger than the magic number. The most likely explanation is that this is due to anti-denial-of-service software. When I ran tests on a server where I had full control over ALL software on the system, this didn't happen.
When I set up a Perl CGI script on one of the shared hosting servers, it suffered the same problem. I asked Wil to look into this a bit more, and when he set up a Perl CGI script to handle uploads he noticed that he could not track the upload progress of file. While his script was written to append data to a file as it came in, the file would just suddenly show up at full size. It seemed like the entire file was being uploaded to the server and then passed off to his script ... which would make sense if the security software were proxying POST data so it could prevent certain types of attacks.
Progress Bars
The second main issue with uploading large files using PHP is that PHP doesn't support progress bars for files being uploaded by default. There are numerous ways to ensure that a progress bar will show up,
Client side solutions:
- Use an HTML5 JavaScript uploader.
- Use Flash to upload the file.
- Use a Java applet to upload the file.
Server side solutions:
- Use Perl CGI.
- Install the Upload Progress PECL Package http://pecl.php.net/package/uploadprogress/
- Re-compile PHP with the Alternative PHP Cache Extension http://php.net/manual/en/book.apc.php
Initially I wanted to use a Flash uploader. I've used these in the past and they are quite easy to integrate and allow things to fall back to a standard HTML form submission if Flash is not available. However, I soon ran into a problem. It seems that Flash on Mac OS X will try to load the entire file into memory before uploading it. From what I've read, Flash on Windows or Linux doesn't have this problem, but since I suspect a large percentage of the end users of this particular upload form would be using Macs, I couldn't just ignore the issue. Plus I'm testing on a Mac myself ... I'd really prefer to have an upload form that I could make use of. Trying to use a Flash uploader to upload a 1GB file on my laptop caused everything to freeze up, which meant Flash was out of the question. So I kept hunting. I ended up trying out quite a wide variety of tools.
Tool | Pros | Cons |
---|---|---|
SWF Upload |
|
|
PLUpload |
|
|
FileChucker |
|
|
jQuery File Upload |
|
|
JumpLoader |
|
|
Jotform |
|
|
YUI Uploader |
|
|
Conclusion
I'm currently leaning toward using the jQuery File Upload script. It's simple to integrate, and doesn't require anything special on the client side. The only downside is that IE users will see a spinner instead of a progress bar. Unfortunately, the only way I could get progress bars in IE was through a Flash, Silverlight, or Java uploader and none of the ones I tested worked well in OSX. So it comes down to IE or everything else.