Really pissed at Google Storage right now…

I was on the $5/year plan for $20 and when I went to visit the Google Storage recently, it said there was an upgrade to $2.49. I mistakenly thought it was $2.49 for the year but in fact, it’s per month. They make all the plans look similiar and said it was UPGRADE.

So stupid me, I clicked it and next thing I know, I lost my $5 plan and was put in the higher monthly plan.

Damn you Google. Bullshit.

Fancybox load iframe into fancybox popup manually

$.fancybox(
                            { ‘href’: ‘www.yahoo.com’ },
                            {
                                ‘width’: 950,
                                ‘height’: 300,
                                overlayShow: true,
                                type: ‘iframe’
                            }).resize();

PHP recursive find files and directories by filename

http://snippets.dzone.com/posts/show/4147

function my_handler($filename) {
  echo $filename . "\n";
}
find_files('c:/', '/php$/', 'my_handler');



And the actual snippet

function find_files($path, $pattern, $callback) {
  $path = rtrim(str_replace("\\", "/", $path), '/') . '/';
  $matches = Array();
  $entries = Array();
  $dir = dir($path);
  while (false !== ($entry = $dir->read())) {
    $entries[] = $entry;
  }
  $dir->close();
  foreach ($entries as $entry) {
    $fullname = $path . $entry;
    if ($entry != '.' && $entry != '..' && is_dir($fullname)) {
      find_files($fullname, $pattern, $callback);
    } else if (is_file($fullname) && preg_match($pattern, $entry)) {
      call_user_func($callback, $fullname);
    }
  }
}

Fast way to create PNG thumbnails of EPS files on Mac OS X

  1. Install MacPort at http://www.macports.org/install.php
  2. Install ImageMagick http://www.imagemagick.org/script/binary-releases.php
  3. Go to directory with all your vector files and open Terminal
  4. find . \( ! -regex ‘.*/\..*’ \) -type f -name “*.eps” -print -exec convert -resize 200×200  -colorspace RGB -quality 50  ‘{}’ ‘{}’-thumbnail.png \;
  5. The regex ignores the hidden files in directories and resize resizes it

Running latest Mediatomb on Promise NS4300N NAS drive

  1. Go to http://mediatomb.cc/pages/download#static
    1. Find the one for the Promise architecture. Just search the page for promise.
    2. Download it and unarchive it
  2. Go to your media server using network drive on your computer
  3. Copy the files from unarchived media tomb to your media server
  4. Go to your media server using SSH (you’ll have to download plugin to allow you to SSH into it)
  5. Go to directory where you copied the files and run using command ./mediatomb.sh 
  6. Might have to make it executable using chmod +x mediatomb.sh

ZMODO 8 CH DVR Outdoor IR Surveillance System PKD-DK0866-NHD Review

I am using the Zmodo 8 chnnel DVD IR Surveillance system PKD-DK0866-NHD and have to say it’s kind of crappy. It’s very cheap and not that hard to install. The only problem is the video quality. The cameras that come with it are pure crap at 420TVL or something like that and if you want to view on browser, you must use IE with ActiveX. 

You can run it using Asee on the Mac. Just run App Store app in your Mac OS X and find the Asee app and install it and it’ll work. I go tit working fairly simple but again, crappy video quality.

I bought some higher resolution cameras off ebay (mostly from Hong Kong) that were 700TVL and more but the quality was again crappy. I am not sure if it’s the DVR system or the cameras. I am suspecting it’s the Zmodo DVR.

I just ordered a Swann 16 channel system from Costco and will let you know if that’s any better. I’ll also try to include some sample photos of the Zmodo here for comparison.

Again, for less than $200, it’s kind of crappy. 

Update 2/15/2012: I tested the Swann 8 channel system from Costco for $599 and found it to be also bad. Same software as Zmodo and looks great on monitor but as soon as you view it via mobile, it looks crappy. The Swann cameras were much better than Zmodo though… esp in black and white situations. Software was the same. 

Using CSS after to add a inner border to an image

http://www.storiesinflight.com/html5/pseudo_after.html

 

<div class="framedphoto"><img src="images/crossings1.jpg" width="200" height="150"></div>

<style>
.framedphoto {
	position: relative;
	display: inline-block;
	font-size: 0;
	line-height: 0;
}

.framedphoto:after {
	position: absolute;
	top: 0px;
	left: 0px;
	bottom: 0px;
	right: 0px;
	content: " ";
	border: 10px solid;
	-moz-border-image: url('images/overlay2.png') 20 20 20 20 stretch stretch;
	-webkit-border-image: url('images/overlay2.png') 20 20 20 20 stretch stretch;
	border-image: url('images/overlay2.png') 20 20 20 20 stretch stretch;
}
</style>

Visual gallery of things