Monday, November 26, 2012

"Youtube close button proxy"-component, are you serious?..

Saturday, July 21, 2012

JavaScript : Simple document load check

I usually use jquery's $(document).load(), but in a particular case, i wanted to trim loadtimes, and used this altered version of something i found on stackoverflow.
 


 

Wednesday, May 16, 2012

Adobe destroyed Flash

Adobe destroyed flash. End of story They might put alot of fancy stuff, but mostly it just breaks, and i've had enough now.. i'm DONE promoting flash IDE, it sucks!

Monday, April 2, 2012

Windows 8 using Ribbon

Windows 8 will be using the Ribbon library..(office 2010 menu style) - I really don't like this.

First off, i'm a big fan of the old win2000 taskbar / start menu interface.. and until now i've been able to modify even windows 7 to act and look the way i want. Again, simple is better! ..functionality uber alles. I generally dont like wallpapers, no widgets.. no fancy stuff.

I really respect truly innovative ideas.. the explorer address bar that came in vista.. i didnt see that one coming, and that is really an enhancement!

On the other hand, one of my favorite features the "SendTo" menu, got crippled since Vista because it now lacks the abilty to contain nested folders.

Implementing Ribbon seems like a desperate choice, just the fact they thought of it.. pheee.. shame! - I'd really like to work for MS and tell them how to make the best UI for real computer users..(now they got Metro for complete idiots)

Microsoft, Please let me know.. i got a couple or 20 good ideas.. here's some

1. Make the SendTo menu able to contain nested folders (like <=XP)
2. Better support for video and graphic thumbnails in general.
3. Prioritize functionality and readability over fancy glossy buttons and animations. (this is here windows should win over osx)
4. Customizeable UI / Workflows is everything.
5. Make a better search functionality, since Vista search has been crippled.
...

Saturday, March 31, 2012

WordPress : Find image sizes from filname/URL

This function is a small hack to scan the upload directory for an image matching certain sizes. The search based on the image names and wordpress nameconvention (xxxxxx-300x200.jpg)

The whole point of this, is you can use this outside the wordpress "loop".

The function uses 3 arguments, third one is optional.
1. $fpath - complete filepath to "original image"
2. $minSizes - array of minimum width/height
3. $maxSizes [optional] - array of maximum width/height

Put following in your themes functions.php

 
function findImageSize($fpath, $minSizes = array(1,1), $maxSizes = array(9999,9999) ){
 $res = false;
 $bs = basename($fpath, ".jpg");
 
 $uploadDir = "wp-content/uploads/";
 $siteUrl = site_url('/');
 $results = glob("{".$uploadDir.$bs."-*x*.jpg"."}",GLOB_BRACE);
 
 $smallest = array(9999,9999);
 
 foreach ($results as $v) {
  $bst = basename($v, ".jpg");
  $ldi = strrpos($bst,"-");
  
  if($ldi === false){
  }else {
   $tmp = substr($bst,$ldi+1); $wihe = split("x",$tmp); $iw = intval($wihe[0]); $ih = intval($wihe[1]);
   if($iw < $minSizes[0]){;} else if ($iw > $maxSizes[0]){;} else if($ih < $minSizes[1]){;} else if($ih > $maxSizes[1]){;} else { 
    if( ($iw*$ih) < ($smallest[0]*$smallest[1]) ){
     $smallest[0] = $iw;
     $smallest[1] = $ih;
     $res = array ('url' => ($siteUrl.$v), 'width' => $iw,'height' => $ih);
     }
    
    }
   }
  }
 
 
 return $res;
 }
 

// Example
$res = findImageSize("http://myblog.com/wp-content/uploads/my-poster-image.jpg", array(300,600) ,array(1024,1024) );
echo $res[url];
echo $res[width];
echo $res[height]; 

Sunday, February 12, 2012

SEO: Hiding SEO content

I've read on numerous websites that google does all kind of fancy tricks to check if you are trying to hide your content. I know for a fact that you can fill a div with content, and then replace the content of that div with javascript, and still the initial content will be indexed!
the totally new an fantastic fliastioboklenki for wella shampoo


Chris Jordan captures visual landscapes of waste from todays intolerable mass consumption.