Imgur.com vs Minus.com? Google+ Sliding In

GIFs are everywhere. The short attention spans of the internet-going public combined with better network speeds and higher bandwith has made the GIF a perfect medium for conveying short bursts of information (that is, until HTML5 video catches on). It’s quite remarkable that this relatively ancient technology is fast becoming the preferred way of communicating short “videos” where sound is a non-essential factor.

Reddit-inspired imgur.com is considered the de facto standard for sharing non-personal images across the internet (Instagram owns the personal domain). The free account allows for 5MB uploads (recently changed form 2MB) and a paid account is currently at 10MB. GIFs however, are becoming larger and larger in size. These limits inspired the creation of minus.com, a service that boasts a limit of 15MB which is good enough for most GIFs that are created. The latter service, however, lacks in speed and comes equipped with a horrible mobile site that, if not changed, will bleed them users. Also-rans in the field also include PhotoBucket, ImageShack, and countless others that for one reason or the other (e.g., poor interfaces, disjointed user experience) are simply not options.

This is where Google+ and the now infamous googleusercontent.com domain comes in. The fledgling social network has attracted users (myself included) in a manner that may have been entirely unintended: large size image sharing. Built on the famed infrastructure of Google, Google+ stores its images on sub-domains of googleusercontent.com, which delivers images at a speed that blows out imgur.com and minus.com.

I did some benchmarking (non-scientific) using the siege command in Linux and it looks like I caught Imgur.com on a bad day, but nonetheless, the difference between Google+ and the rest is mind boggling. The following is a test against a GIF of 3.521 MB.

Minus.com

$siege -c20 -d1 -t1m http://i.minus.com/izTmeKJf6TLib.gif
Transactions: 340 hits
Availability: 100.00 %
Elapsed time: 59.80 secs
Data transferred: 1169.07 MB
Response time: 2.91 secs
Transaction rate: 5.69 trans/sec
Throughput: 19.55 MB/sec
Concurrency: 16.53
Successful transactions: 340
Failed transactions: 0
Longest transaction: 4.01
Shortest transaction: 1.88

Imgur.com

Transactions: 105 hits
Availability: 100.00 %
Elapsed time: 59.90 secs
Data transferred: 361.04 MB
Response time: 8.31 secs
Transaction rate: 1.75 trans/sec
Throughput: 6.03 MB/sec
Concurrency: 14.57
Successful transactions: 105
Failed transactions: 0
Longest transaction: 24.61
Shortest transaction: 0.50

Google+

$siege -c20 -d1 -t1m https://lh5.googleusercontent.com/-9HgHEsdRfXY/Ukcmb4Qx6MI/AAAAAAAAANM/9e88oZQBbOQ/w506-h284/ramseysh.gif
Transactions: 668 hits
Availability: 100.00 %
Elapsed time: 59.49 secs
Data transferred: 2296.87 MB
Response time: 1.26 secs
Transaction rate: 11.23 trans/sec
Throughput: 38.61 MB/sec
Concurrency: 14.17
Successful transactions: 668
Failed transactions: 0
Longest transaction: 2.21
Shortest transaction: 0.71

Give it some time and Google+ will be taking over. It’s already started.

Phishing Emails Aren’t Trying Anymore

Got this in my inbox today:

Dear Customer


As part of our security measures, weregularly monitor the
Bank system, will add $200.00 credit to your 
account just for taking part in our quick 5 question survey Bank 
Of Montreal.

Information you have requested for the following reason:
Our system detected unusual debit on your account

This is a last reminder asking you to log in to Bank
account as soon as possible.

Please download and unpack the form attached to this email and 
open it in a web browser.
Once opened, you will be provided with steps to restore your 
account access.
We appreciate your understanding as we work to
ensure account safety.

Please do not reply to this email. Emails sent to
this address conot be answered.

© Copyright BMO Financial Groups 2011. All rights reserved

Smugmash: Turn your SmugMug pics into a YouTube video

Recently I came across Pummelvision, which takes your photos from Flickr and other similar sites and creates a video out of them. Being a loyal SmugMug user for years, I was a bit disappointed that they hadn’t thought of SmugMug when making this app. So, I put my dev skills to test and came up with SmugMash:

http://smugmash.arsenalist.com/

You can choose to have all your SmugMug photos made into a video, or you can select a gallery. Until Pummelvision decides to add SmugMug, at least we got something. Here’s an example of a video made through this app. If you have support issues, you can find me on Twitter

View Unread or New Comments in Disqus – WordPress Hack

The job here is to highlight unread or new comments that a visitor to your site has not seen. This is especially helpful when you have a blog with lots of threaded comments where it becomes difficult for a reader to get a grip on just where they should look to read new comments. This method can work anywhere, not just in WordPress, but this example is geared towards the Disqus WordPress Plugin. Once you install the plugin, find the comments.php file located inside the plugin folder, usually something like wp-content/plugins/disqus-comment-system/comments.php.

Open it up and find the following line of code:

    
<?php if (!get_option('disqus_manual_sync')): ?>

Right before that line, paste the following:

    
		config.callbacks.afterRender.push(function() {
			jQuery(function($) {
				var largestReadId = document.cookie.match ( '(^|;) ?largest_read_id=([^;]*)(;|$)' );
				largestReadId = largestReadId ? parseInt(unescape(largestReadId[2])) : 0;
				var newLargestReadId = 0;
				$('.dsq-comment-header').each(function() {
					id = parseInt($(this).attr('id').split('-')[3]);
					if (id > largestReadId) $(this).parent().css('background', 'lavender');
					if (id > newLargestReadId) newLargestReadId = id;
				});
				var expiry = new Date();
				expiry.setTime(expiry.getTime() + 7 * 24 * 60 * 60 * 1000); // 7 days
				document.cookie = "largest_read_id=" + newLargestReadId +"; expires=" + expiry.toUTCString();
		});

Done!

All we’re doing is setting a cookie storing the largest read disqus comment id per post in the user’s browser. If a comment id smaller than it is encountered, it’s left alone. If a bigger one is encountered, then we use jQuery’s parent() and css() functions to add some styling to the comment. You can change that line as you desire. You can see this feature implemented on Raptors Republic

Follow me on Twitter – @zararsiddiqi

Free World Cup 2010 Office Pool Software

Thanks to Haroon Rafique and Cris Diaconu for their contributions.

This pool is much like the last one. You are free to download the software.

It’s basically one index.php script which does everything. The SQL script is also in there, all you’ll need to do is put it on a PHP enabled server somewhere and change the ez_sql.php file to point to the right database.

Here’s what mine looks like:

http://haroon.sis.utoronto.ca/football/

We’ve added some fancy stuff like Google Charts integration which tracks the leaderboard etc.

Enjoy and good luck!

How does Microsoft Exchange NOT send this to SPAM?

This was a message sent with “High Importance” and our Exchange server let it through. It’s like their spam filter checks for the word ‘viagra’ and that’s it. Anything else passes.

Subject:

©Ð«Î¶U´Ú¡C©Ð«Î¥u n¦³´Ý È¥i¶U¡C©ã¼Ðª÷¥N¹Ô¡CThu, 13 May 2010 18:50:14 +0100
¤uµ{¥N¹Ô´Ú¡C©Ð«Î¥þÃB¶U´Ú¡CªA°È¹q¸Ü¡G¢¯¢¸¢´¢·¢´¢µ¢¸¢¯¢²¢´¡E¤¤ªø´Á¶U´Ú¡C¥Á¶¡1¤À3°_¡CThu , 13 May 2010 15:43:14 -0200 [da_che@xuite.net]

Message:

¦U¤¤¤p¥ø·~¡B¤¤¤j¥ø·~©ñ´Ú¡C¦UºØ©Ð¦a¶U´Ú.»È¦æ¶U´Ú¡C©Ð«Î¥þÃB¶U´Ú¡C¦Xªk¯²¸î¤½¥q’«È²¼¶K²{‘¦~®§17%¡CªA°È¹q¸Ü¡G¢¯¢¸¢´¢·¢´¢µ¢¸¢¯¢²¢´¡E»È¦æ¦X¬ù¶U´Ú¡CThu, 13 May 2010 14:41:14 -0300

¯S©±ª÷¦n¶U
µu¤¤ªø´Á¿Ä¸ê/Áp¶U·~°È
Áp«O·~°È/±M®×¿Ä¸ê
µu¤¤ªø´Á¿Ä¸ê
µu´Á©Ê¿Ä¸ê
a.¹Ô¥I°ê¤º²¼´Ú·~°È
b.§Ö³t³qÃö¶U´Ú
c.¥ø·~¥I´Ú³qª¾³æ¶U´Ú
d.¥~¾P¶U´Ú
¤¤ªø´Á©Ê¿Ä¸ê
a.¸ê¥»©Ê¤ä¥X¶U´Ú
¡´«Ø¼t¶U´Ú
¡´Áʸm¾÷¾¹³]³Æ¶U´Ú
¡´ «¨®¶U´Ú
b.Àç«Ø¶U´Ú
¡´«Ø¿v·~¤g¦a¿Ä¸ê
¡´«Ø¿v·~«Ø¿v¿Ä¸ê
¡´Àç³y·~¤uµ{¦X¬ù¶U´Ú
Åwªï¨Ó¹q¢¯¢¸¢´¢·¢´¢µ¢¸¢¯¢²¢´

¥N¹Ô©ã¼Ðª÷¡C¦Xªk¯²¸î¤½¥q’«È²¼¶K²{‘¦~®§17%¡C©Ð«Î¥þÃB¶U´Ú¡C¡E²¼¾Ú¿Ä¸ê¡C¦b¬°¸êª÷½Õ«×·Ð´o¶Ü?Thu, 13 May 2010 16:48:14 -0100

DB2 is so lame

So I’m trying to change the size of a column in DB2. Nothing fancy, just expand a varchar from 100 to 200 and in DB2 Control Center I get the following message:

The current column attribute change may take some time to complete, as it requires re-creating the table, loading the data, and restoring the dependencies.

This table is approximately 0.00390625 Mb in size. The new table will be created before the existing table is removed.

Click ‘Related Objects…’ for more detail.

I find it crazy that MySQL can do this in a heartbeat and a commercial database like DB2 needs to jump through the hoops of dropping, backing up data, recreating data, deleting the backup and God knows what else.

Lame.

Using SQL queries to read Excel files in macros

I’m doing my Masters in Geographic Information Systems at U of T and found the need to do this in my research.

You can treat Excel sheets as tables and perform SELECTs and JOINS like you would against a regular database. The language is Visual Basic (VBA to be exact). You can put the following code inside a Macro Sub. NAICS_CODE (Row 1) is a heading of one of the columns in the Results worksheet.

I did need to add the Microsoft ActiveX Data Objects 6.0 Library by going to Tools -> References in the VBA Project (the program that opens up when you edit a macro).

    
    Dim cn As ADODB.Connection
    Set cn = New ADODB.Connection
    Dim rs As New ADODB.Recordset

    With cn
       .Provider = "Microsoft.Jet.OLEDB.4.0"
       .ConnectionString = "Data Source=C:\Users\zarar\Documents\researchdata.xls;" & _
            "Extended Properties=Excel 8.0;"
        .Open
    End With
    
    'Store all naicsCodes in an array
    Dim naicsCodes() As String
    'Get all distinct NAICS codes
    Set rs = cn.Execute("SELECT DISTINCT NAICS_CODE FROM [Results$]")
    Dim i
    i = 0
    Do Until rs.EOF
        ReDim Preserve naicsCodes(i + 1)
        naicsCodes(i) = rs.Fields("NAICS_CODE")
        i = i + 1
        rs.MoveNext
    Loop
    rs.Close
    cn.Close