Browsing Posts in Uncategorized

So, everyone knows IE’s existence is easily worse than anything Hitler ever did.  I needed to be able to detect what versions of browsers were coming to my site and give them an playful suggestion for them upgrade their browser, or face potential disgusting css bugs.  So… I wrote this script here, that I feel is a bit easier to understand than many other javascript people have found once upon a google.

Place this in a file, I called it browser.js, and include it in your <head> tag.
Then do something like

if (isClientBrowserTooOld()) alert("I'm sorry Dave, but your browser is older than you are. You'll need to download the latest version of your browser before I can let you continue, Dave");

or something to that effect.

And for zhe script:

function isClientBrowserTooOld(){
    var ua = window.navigator.userAgent
	var ie = msieVersion(ua);
	var chrome = chromeVersion(ua);
	var firefox = firefoxVersion(ua);
	var safari = safariVersion(ua);

	//alert(ie + ":" + chrome +  ":" + firefox +  ":" + safari); //debugging
	if (ie < 7.0 && ie > 0) return true;
	else if (chrome < 5.0 && chorme > 0) return true;
	else if (firefox < 3.4 && firefox > 0) return true;
	else if (safari < 4 && safari > 0) return true;
	else return false;
}

// Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
function msieVersion(ua){
      var msie = ua.indexOf("MSIE ");
      if ( msie > 0 )      // If Internet Explorer, return version number
         return parseInt(ua.substring(msie+5, ua.indexOf(".", msie )));
      else                 // If another browser, return 0
         return 0;
}

// Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.475.0 Safari/534.3
function chromeVersion(ua){
	var chrome = ua.indexOf("Chrome/");
	if (chrome > 0) return parseInt(ua.substring(chrome+7, ua.indexOf(".", chrome) + 1)); // returns 6.0
	else return 0;
}

// Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b2) Gecko/20100720 Firefox/4.0b2
function firefoxVersion(ua){
	var ff = ua.indexOf("Firefox");
	if (ff > 0) return parseInt(ua.substring(ff+8, ua.indexOf(".", ff) + 1)); // returns 4.0
	else return 0;
}

// Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8
function safariVersion(ua){
	var safari = ua.indexOf("Version");
	if (safari > 0 && ua.indexOf("Safari") > 0) return parseInt(ua.substring(safari+8, ua.indexOf(".", safari) + 1)); // returns 5.0
	else return 0;
}

So… I’m really surprised that chat bots are so terrible… Is it so hard to make a bot keep track of entire conversation? No. =)

Anyway… Here is my first chat bot convo.

http://www.cleverbot.com/

Bold is the chat bot talking…

continue reading…

Alright, so after trying to use my first solution: I decided terminal is faster. I will probably right some sort of plugin for the finder in the future, if someone doesn’t beat me to it.

Anyway, here is how I currently do SVN

Open Terminal

type cd then drag your SVN folder to the terminal and hit enter.

Most common svn commands:

svn status | grep “^\?” | sed -e ‘s/? *//’ | sed -e ‘s/ /\\ /g’ | xargs svn add

• recursively adds all files..

Adding Files: svn add –force ./* adds all new files in a directory.
Committing: svn commit -m”message” Commit Message is needed, or commit won’t always work
Deleting Files: svn delete file.name
Updating: svn up
File list: svn ls
Latest stats: svn info

For everything else, svn help will bring up more commands

svn help <command> will bring up help for that command. ^_^

Expose:

Almost 3 weeks into using Snow Leopard, and I haven’t found too many new things, but here is a list of things I’ve found that are neat.

Being able to select a different application while in Expose, even if that app isn’t
Minimized windows have their own little section so that we don’t forget about them (This happened to me a lot back in leopard: I’d go file->open, and the file would just un-minimize.). Total time saver ^_^

System Preferences

One of my biggest complaints in leopard was that the folders for desktop backgrounds would all say ‘Aperture’ (only if you had aperture installed). So, my temporary fix was to close System Preferences, move my Aperture library, and re-open System Preferences before OS X found out where I moved the Aperture library to.

Keyboard shortcuts are finally organized and not terribly chaotic!


What I’d like to see:

Multiple monitor support is terrible in OS X. I mean, It works flawlessly. But If i have multiple screens, I don’t want my spaces to get bigger. I want Space 1 on my main screen. and Space 2 on my secondary screen. I am a Software Engineer in training and I just can’t believe Apple’s engineers haven’t fixed this problem yet.

I switched to wordpress so I can have my own blog on my own site.

There have been a lot of great movies released this summer. No doubt about it. However last summer it seemed there were hardly any good movies. There are definitely more action movies this summer, and less movies that generate revenue mostly by kids wanting to go see a movie and dragging along their parents, which pretty much doubles the income for that movie.

I haven’t seen all of these, but they are the ones that have caught my attention… And there are certainly movies that I may not have even heard about… So, sorry if the list is incomplete.

Terminator Salvation
This film, while overall pretty good, disappointed many Terminator fans. I think one of the mistakes they made was giving away too much in the trailers. There wasn’t much surprise. Not to mention a cheesy ending. But definitely the most realistic Terminator movie to date.

Surrogates
Hasn’t been released yet but the trailers look promising: View the trailer here

Star Trek
I’m not a Star Trek fan, and viewers of this movie don’t need to have any prior star trek knowledge or even like star trek to like this movie.

District 9
I haven’t seen this one yet, but I’m hearing a lot of positive things. Mini Summary: “An extraterrestrial race forced to live in slum-like conditions on Earth suddenly find a kindred spirit in a government agent that is exposed to their biotechnology.”

G.I. Joe: The Rise of Cobra
I haven’t seen this one yet, either, but I’ve heard nothing negative: “An elite military unit comprised of special operatives known as G.I. Joe, operating out of The Pit, takes on an evil organization led by a notorious arms dealer.”

Transformers: Revenge of the Fallen
Lots of controversy arose from this beast. Visual effects were stunning, people say the story was lacking, and didn’t know how they felt about Optimus pulling a Jesus. The only issue I have is the excessive amount of comedic relief characters, the new Transformers are too characturized (they don’t look enough like machines, like in the first Transformeres) and some of the comedy was far too immature for my liking.

Harry Potter and the Half-Blood Prince
Record breaking revenue for any midnight show, ever. People complain about how it wasn’t exactly like the book… What can ya do? I enjoyed it.

Angel & Demons
I haven’t seen this one. “Harvard symbologist Robert Langdon works to solve a murder and prevent a terrorist act against the Vatican.” IMDB has a lame mini plot summary.

Up
“By tying thousands of balloon to his home, 78-year-old Carl Fredricksen sets out to fulfill his lifelong dream to see the wilds of South America. Right after lifting off, however, he learns he isn’t alone on his journey, since Russell, a wilderness explorer 70 years his junior, has inadvertently become a stowaway on the trip. ”

A Perfect Getaway
I was told this was going to be horror movie, so at first I didn’t really want to see it. But it turned out to be a pretty good thriller / comedy. Plus Milla Jovovich from Resident Evil is in it (There’s just something about a female kicking butt, that screams awesome).

Public Enemies
Really wanted to see this one, still haven’t, but neither has Johnny Depp, so I don’t feel so bad. “The Feds try to take down notorious American gangsters John Dillinger, Baby Face Nelson and Pretty Boy Floyd during a booming crime wave in the 1930s.”

The Time Traveler’s Wife
I saw the trailer for this and thought “I HAVE TO SEE THIS!!!” (My inner monologue can get very excited and loud.. definitely worthy of police intervention)

X-Men Origins:Wolverine
Good Action Film despite the predictability. But being able to predict movies just appears in ones repertoire of skills as one watches many movies.

I might move my blog to this one, because of the lack of features my current one has.

So, this is a script that will automate the installation required for converting mkv dts to ac3 for use on the tv.

original article with full installation and use instructions:

http://iamthekiller.net/2009/03/convert-mkv-video-for-the-appletv/

The only problem that might arise is the script not knowing where the progress bar is. It is in /Applications/BP Progress Bar.app it is downloaded for installation, and removed after.

when finished, you can run

$>mkvdts2ac3 path/to/file.mkv

or

$>mkvdts2ac3 -n path/to/file.mkv to remove the original dts track.

enjoy!

http://dl.getdropbox.com/u/331982/Downloads/ConvertmkvDTS2AC3.zip

So, motorcycles are very attractive pieces of transportation, but are the most accident prone (aside from the uni-wheel). So, here are some concept bikes that are sure to catch people’s attention on the road.

Now this is a crotch rocket:
Ferrari Inspired
Article with yellow version

Awesome Chopper
Swordfish Concept

… with a V10 Engine?!?!? upto 300mph
Dodge Tomahawk

4 Wheeled Motorcycle?
Yamaha Tesseract

My favorite:
Suzuki Biplane

Just uploaded the project to Google Code.

Here is the project link: http://code.google.com/p/kismetmac/

Powered by WordPress Web Design by SRS Solutions © 2012 L. Preston Sego III Design by SRS Solutions