Microsoft Internet Explorer 9

Microsoft just released their Internet Explorer 9 platform preview. Upon loading the site, the first thing that caught my eye was an Acid3 test thumbnail with a score of 55/100. It makes me wonder, how shameless can they be.

IE9 Acid3 Test

IE9 Acid3 Test

I decided to overlook their stupidity and give it a try. On the first startup, it decided to crash on me. Off to a bad start Stevie-boy

IE9 now supports HTML5 [Finally], passed the CSS3 selectors test [Finally again], and averaged a 598.80ms on the SunSpider test [Doubtful about this one].

It’s still in the early stages, so there’s still room for improvement. We’ll just have to wait and see. I on the other hand, am not looking forward to anything that’s worth noting.

I know Windows is awful. Everyone knows Windows is awful. Windows is like the faint smell of piss in a subway: it’s there, and there’s nothing you can do about it. ~Charlie Brooker

Mac OS X Tips and Tricks: Part 1

Apple’s Mac OS X is so versatile that you can do almost anything you want with it; Yes, even sexing it up if you want to. The point here is, there are many hidden features and settings that many users never bother to know, with the exception of enthusiasts. So I will be trying to compile these treasures as often as I can; Therefore I do not know how many parts this post will be in, but rest assure that it will come to an end… when Apple comes to an end.

I wrote about one Dock trick in an earlier post and have decided to expand my “Tips and Tricks” archive. Most of the tips and tricks I will be mentioning in this post will apply to Snow Leopard and they will be in the form of terminal commands, so for those of you who are not familiar with the terminal, have no fear. The terminal app is located at /Applications/Utilities and you can copy and paste or just highlight then drag and drop the commands into your terminal window. “I know, you can’t do that in Windows!”

After executing the commands, you will have to restart the targeted application for the changes to take effect. If it’s a Finder or Dock tweak, the easiest way is to execute the appropriate command in terminal as follow:

  • killall Finder
  • killall Dock

To revert the changes you’ve made, just change the keywords of the command you executed as listed below:

  • YES to NO and vice versa
  • TRUE to FALSE and vice versa
  • 0 to 1 and vice versa

Commands

1. Quick Look X-Ray Folders

Enables you to preview files that are in a folder through a translucent folder icon when using Quick Look. The files will cycle through every 3 seconds when there are more than 5 files in the folder.

defaults write com.apple.finder QLEnableXRayFolders 1; killall Finder

Quick Look

Quick Look

2. Mouse-Over Highlights In Stacks
Items in your stacks that are in grid view will be highlighted when you hover your mouse cursor over them.

defaults write com.apple.dock mouse-over-hilite-stack -boolean YES; killall Dock

Grid

Grid

Fan

Fan

3. Make List View Look Like Grid View
Change list view to closely mimic grid view in your stacks.

defaults write com.apple.dock use-new-list-stack -bool YES; killall Dock

List

List

4. One-Window Dictionary
I like using the contextual menu to look up words when browsing the internet as oppose to using Command+Control+D[1] because of the keys being too close together, but since Snow Leopard, every time I look up a new word Dictionary just keeps opening new windows and that annoys the hell out of me. For those of you who are like me, the following command will force Dictionary to use only 1 window.

defaults write com.apple.Dictionary ProhibitNewWindowForRequest -bool TRUE

5. QuickTime Remaining In Full Screen
Whenever watching a movie on my Mac I occasionally get IM messages and when I Command+Tab[2] to view the message, my QuickTime window will always exits full screen, which isn’t what I want it to do. To keep QuickTime always in full screen execute the following command.

defaults write com.apple.QuickTimePlayerX MGFullScreenExitOnAppSwitch 0

6. Auto Play QuickTime Videos
By default QuickTIme does not auto play a video file when you open it. To enable auto play upon opening a video file execute the following command.

defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen 1

7. Automatically Turn On Closed Captioning and Subtitles
Sometimes when playing a movie, I like to turn on subtitles because let’s face it, not all actors and actresses have been taught to speak clearly in theater school. But always having to click the menu to check if there are subtitles is just troublesome. The following command will automatically turn on closed captioning and subtitles when playing a video if they are available.

defaults write com.apple.QuickTimePlayerX MGEnableCCAndSubtitlesOnOpen 1

8. Address Book Debug Menu
The debug menu in Address Book enables some extra options, with one of them being able to toggle contact picture reflections; But the menu is hidden. To show the debug menu, run the following command.

defaults write com.apple.AddressBook ABShowDebugMenu -bool TRUE

Address Book

Address Book

Reference

[1] Command+Control+D allows quick definition look-ups within Cocoa applications such as Safari, Mail, Adium, etc.

[2] Command+Tab allows you to switch between running applications, just like CTRL+Tab on a Windows machine.

Audio For Everybody!

When The Love Falls by Sean OoiDownload Audio: Audio Format "MP3" | Audio Format "OGG"

Prologue

A few posts back I used the new HTML 5 video tag to display a video. That chunk of code was written by Kroc Camen and is compatible across most major browsers, including IE and the iPhone. One of the reasons I like it is because there is no JavaScript involved, making it lightweight.

It was his Video for Everybody post that inspired me to write this post. I figured since there's a cross-browser compatible code for the video tag, it would only be right to have one for the audio tag as well; A simple Google search came up with one related site that was very poorly written, so I decided to write one myself, based heavily on Kroc's code.

I've tested my codes on the iPhone and on common web browsers which includes Firefox, Safari and Opera on both Windows and Mac OS X, and Google Chrome and IE on Windows.

Compatibility

The code is validated as HTML 5. It will first try the HTML 5 playback, and fallback to flash if needed. If neither works, it will display an image showing users that no streaming capability is available and will ask to download the file instead.

  • Firefox 3.5: HTML5-OGG
  • Safari 4 (Mac): HTML5-MP3
  • Safari 4 (PC): HTML5-MP3→Flash
  • iPhone OS 3.1.2: HTML5-MP3 (Small play area due to the lack of the width & height attribute)
  • Opera 10: QT→Flash
  • Chrome 3: HTML5-OGG
  • <= IE 6: Flash
  • >= IE 7: Windows Media Player
Firefox

Firefox

Chrome

Chrome

IE

IE

iPhone

iPhone

Opera

Opera

The Code

<!-- Try HTML 5 playback first. -->
	<audio controls="controls">
	<source src="__AUDIO__.OGG" type="audio/ogg" /> <!-- Firefox and Chrome -->
	<source src="__AUDIO__.MP3" type="audio/mpeg" /> <!-- Safari and iPhone -->

<!-- Windows Media Player class id to enable native streaming on IE 7 and above. IE 6 and below will go straight to flash player -->
	<!--[if gt IE 6]>
	<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" width="320" height="45"><!
	[endif]-->

	<!--[if !IE]><!-->
	<object type="audio/mpeg" data="__AUDIO__.MP3">
	<!--<![endif]-->

<!-- Windows Media Player controls -->
	<param name="url" value="__AUDIO__.MP3" />
	<param name="autostart" value="false" />
	<param name="uiMode" value="full" />

<!-- Flash fallback -->
	<object height="24" width="320" type="application/x-shockwave-flash" data="__FLASH__.SWF" id="audioplayer">
	<param name="movie" value="__FLASH__.SWF" />
	<param name="FlashVars" value="playerID=audioplayer&amp;soundFile=__AUDIO__.MP3" />

<!-- Fallback image when nothing works -->
	<img class src="__POSTER__.JPG" width="128" height="135" alt="Title" title="No audio playback capabilities, please download the audio below" />

	</object><!--[if gt IE 6]><!-->
	</object><!--<![endif]-->
</audio> 

<!-- Download links outside the audio tag -->
<p>Download Audio: <a href="__AUDIO__.MP3">Audio Format "MP3"</a> | <a href="__AUDIO__.OGG">Audio Format "OGG"</a></p>

The line break in line 8 is due to a bug in IE. I'm not sure if it applies to the audio tag as well, but no harm being safe. A more compact version of the source code follows.

<audio controls="controls">
	<source src="__AUDIO__.OGG" type="audio/ogg" />
	<source src="__AUDIO__.MP3" type="audio/mpeg" />
	<!--[if gt IE 6]>
	<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" width="320" height="45"><!
	[endif]--><!--[if !IE]><!-->
	<object type="audio/mpeg" data="__AUDIO__.MP3">
	<!--<![endif]-->
	<param name="url" value="__AUDIO__.MP3" />
	<param name="autostart" value="false" />
	<param name="uiMode" value="full" />
	<object height="24" width="320" type="application/x-shockwave-flash" data="__FLASH__.SWF" id="audioplayer">
	<param name="movie" value="__FLASH__.SWF" />
	<param name="FlashVars" value="playerID=audioplayer&amp;soundFile=__AUDIO__.MP3" />
	<img class src="__POSTER__.JPG" width="128" height="135" alt="Title" title="No audio playback capabilities, please download the audio below" />
	</object><!--[if gt IE 6]><!-->
	</object><!--<![endif]-->
</audio> 
<p>Download Audio: <a href="__AUDIO__.MP3">Audio Format "MP3"</a> | <a href="__AUDIO__.OGG">Audio Format "OGG"</a></p>
Usage notes:
  • Replace __AUDIO__.MP3 with the path to your MP3 encoded file
  • Replace __AUDIO__.OGG with the path to your OGG encoded file
  • Replace __FLASH__.SWF with the path to your flash player. I use the standalone version of WordPress Audio Player
  • Replace __POSTER__.JPG with your JPEG image file for fallback purposes

One reason to put the download links outside the audio tag as said by Kroc for his Video for Everybody code: Give people your audio files—you want them to hear the audio anyway and you are fooling yourself if you think that they shouldn’t be allowed to download the audio.

I am not very confident when it comes to writing codes and explaining. In fact I suck at it, so please contact me if you spot any mistakes in my post. Any kind of help to further improve the code is welcomed as well.

Google Testing New Search Page

An update from Webmonkey shows that Google is currently testing their redesigned search page. Nothing has been mentioned on Google’s Blog yet, so it is unsure if the new search page will go live.

Changes that I’ve noticed are:

  • The Google Search button background has been changed to a blue gradient instead of the grey to white gradient.
  • Top bar link colors have been changed from Medium Blue #0000cc to Royal Blue #4272db
  • Bottom link colors have been changed to Persian Blue #1111cc
  • The Google logo drop shadow and TM branding has been removed
  • Not too sure about this, but there’s a “Make Google your homepage” link now
  • The search box has been embossed up instead of down with
  • The Advance Search and Language Tools links on the side of the search box has been removed
  • Overall dimensions look slightly larger
  • A more aesthetically pleasing visible sidebar

If you’re like me who just can’t wait until it’s official, Google Blogoscoped found a JavaScript snippet that you can use to activate the new page by following the steps below:

  1. Go to Google’s homepage
  2. Log out of your Google account if you’re logged in
  3. Paste the following code in your browser’s address bar and hit enter. It means deleting “http://www.google.com/” from the address bar and pasting the following code
javascript:void(document.cookie="PREF=ID=20b6e4c2f44943bb:U=4bf292d46faad806:TM=1249677602:LM=1257919388:S=odm0Ys-53ZueXfZG;path=/; domain=.google.com");
  1. Refresh your Google homepage

The JavaScript code sets a new cookie, which is why you have to log out of your Google account before you can see the changes. Once the cookie is set, refresh your Google homepage and you should be looking at the new Google.

Google's New Homepage

Google's New Homepage

Google's New Search Page

Google's New Search Page

SSH Into iPhone Without Wireless Router

I have always wondered if it were possible to SSH into my iPhone without a wireless router and search results on Google always pointed to no… This was before I found out that it was possible to do so.

Steps that I will be explaining will only apply to jailbroken iPhones and Macs, because I do not want to waste my time tinkering with Windows’ complicated network settings, so if you’re a PC user, I’m sorry, you’re out of luck. But if you found a way to do so, please do let me know and I can post it up as reference.

Instructions will be based on Mac OS X Snow Leopard 10.6.2 Things you will need will be of course, an iPhone, and a Mac with wireless capabilities. Which covers almost all Macs.

  1. Go into System Preference
  2. Click on Network
  3. Click on AirPort
  4. Turn AirPort on if you haven’t already
  5. Click on the Network Name dropdown menu and choose Create Network…
  6. The Name field will be your wireless name, or SSID. Leave the Channel as it is, and tick Require Password if you wish to do so.
  7. You will be asked to key in your admin password to finalize your network creation

Now that you’ve created a network, it’s time to connect your iPhone and SSH into it.

  1. Connect your iPhone like you would with any WAP.
  2. After you’re connected, give it awhile to register an IP address.
  3. Tap on the blue arrow beside your connected network to reveal your IP address. This is the address you will be using to SSH into your iPhone
  4. I like to use Coda for FTP purposes. But if you don’t have an FTP app, you can try Cyberduck
  5. Fire up your FTP app and click Connect on Coda or New Connection on Cyberduck.
  6. Change the Protocol to SFTP
  7. In the Server text field, type in the IP address you found in step 3
  8. Your username is root
  9. Your password is alpine[1]
  10. Leave the Port as 22 and click Connect

You have just SSH’ed into your iPhone without a wireless router. This method is most probably noted already somewhere on the web, but I have never been able to search for it. So hopefully this post will be of help to cheap people like me who do not want to fork out $50 for a wireless router

Reference

[1] In a previous post, I wrote on the vulnerability of not changing your iPhone’s root password and steps on how to do it. It is highly recommended that you do so as to secure your iPhone.

How To Change Your iPhone Root Password

Recently there’s been a lot of news about jailbroken iPhones being hacked and held for ransom or just having their wallpapers changed.

The reason this only happens on jailbroken iPhones is because they have the SSH daemon running, which is common in most jailbroken iPhones, with the default root password left unchanged. This will enable hackers to gain access into their iPhones and have total control over them, which basically means hijacking their phone.

They can send text messages from your number, use it to call or record your calls, and actually whatever they want, even use it for their hacking activities.

So to prevent it, all you have to do is to change your default root password, which is as easy as following the steps below:

Note1: This will only work if you have not changed your default root password before.

Note2: When typing in your password, don’t worry if nothing shows up. It’s just how it should be.

  1. If you haven’t installed MobileTerminal yet, go to Cydia and search for “MobileTerminal” and install the app.
  2. Launch MobileTerminal, type in su and hit return.
  3. When asked to key in your password, type in alpine and hit return.
  4. You are now logged into your phone as the root user. Now type in passwd and hit return.
  5. You will then be asked for a new password. Type in your new password and hit return.
  6. You will be asked to re-enter your password. Re-enter your new password and hit return.

You’re done! Your root password has been changed and your iPhone is secure once again for now. Right now all you have to do is to not forget what you changed your root password to.

My Blog, Now iPhone Friendly

Just a few days ago I was talking to Keefe about the iPhone version of his blog and how I’m not worried about mine because of 2 reasons:

  1. I don’t have many readers
  2. I don’t know many people who uses the iPhone

Not long after our discussion, I started noticing more and more of my friends using the iPhone, mainly through Facebook, so the latter wasn’t so true anymore, and I decided to make my blog iPhone friendly as well.

My first attempt at searching online always ended up with results with “Just install <some name> plugin and you’re good to go”, which I hated. I don’t know why, but it has always been my personal preference to have it written right into the core of my theme rather than rely on a plugin. Frustrated, I quit my web browser and watched a movie instead.

During my second attempt, I found what I was looking for. No plugins, just altering my CSS file. All I had to do was to add following @media selector in my CSS file and target any elements within the curly brackets.

@media only screen and (max-device-width: 480px) {
}

We declare max-device-width: 480px because of the iPhone’s unique screen size. To style for average mobile devices, using the following selector should be sufficient.

@media handheld{
}

These methods are a nice way of enabling web developers and designers to style their websites to be mobile friendly. But occasionally, there’s bound to be some elements that just can’t be styled the way you want them to because of the original code itself being placed so ever obscurely. The way I countered this was by using a mobile detection script and adding an if/else statement in my PHP file. That way, I can rearrange all my codes for the mobile version of my site without having to temper with the original ones.

After hours of typing and clicking on the refresh button, I’m not-so-proud to unveil the iPhone version of my site.

Main Page

Main Page

Navigation Links

Navigation Links

Landscape View

Landscape View

Mac OS X Dock Spacers

I was reorganizing my desktop when I noticed how cluttered my dock was, so I set out on a quest to find ways on how to make it look more organized and found out that adding spacers to it can help divide my applications into different sections, thus making it look cleaner and neater.

To add spacers to your dock, just fire up Terminal (Applications > Utilities) and run the following command:

defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'

Don’t worry if you don’t see any changes yet, because you still need to reload the dock. To do so, just run the following command in Terminal as well.

killall Dock

Your dock will reload and you should be seeing an empty space (spacer) on your dock now. To add more, just run the first command for as many spacers as you want and reload the dock.

You can add spacers to the right side of the dock too, or also known as the “Stacks” side of the dock. To do so, just run the following command for as many spacers as you want as well, and remember reload the dock when you’re done.

defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}'

To remove these spacers, just right click on them and select “Remove from Dock” or just drag them out of the dock and it’ll *poof* away.

Dock Spacers

Dock Spacers

Microsoft copying Apple?

I recently read about the grand opening of Microsoft’s first retail store, named “Microsoft Store“, idea of the name taken from “Apple Store“? Very likely.

The layout of the store is almost the same as well, but you can’t really blame them, there really isn’t any other way to showcase computers……NOT. Those people at Redmond have been constantly trying to copy and compete with other operating systems, mainly Apple’s Mac OS X, but failed drastically. Quoting Peter Bright from ars technica on the new Windows 7 review:

Once up and running, after briefly admiring the new start-up logo, you’re presented with probably the ugliest default wallpaper of any current OS; even the fecal brown of Ubuntu is more aesthetically pleasing

The styling is inconsistent with the visual cues in the rest of the operating system (it doesn’t follow from the theming of either the new startup screen or the logo on the Start orb, or anywhere else that the logo is used), it’s inconsistent with the Aero Glass appearance that 7 inherits from Vista. And, most importantly, it’s just irredeemably ugly and horrid.

Microsoft did not only tried to copy operating systems, but ads as well. Not so long ago they forked out a large sum of money to make a commercial with Bill Gates and Jerry Seinfeld in it to counter Apple’s “Get A Mac” ads. 2 episodes were released, and it was a huge failure. It was meaningless and it was nowhere near interesting. It was just a total waste of time. Then they came out with their “Laptop Hunter” ads, which was a step-up from the Jerry Seinfeld ads, but didn’t quite his consumers too.

Apart from copying video ads, I’ve noticed that they might have also been starting to copy poster ads as well. I’m not going to say that they are, but the possibilities of it is undoubtedly high. While reading through the grand opening article, I noticed this picture:

Infinite Possibilities

Infinite Possibilities

An ad consisting of what looks to be like somewhat of a collage of Windows software images on the top and bottom of the poster, with a tag line in the middle.

As fas as I know, Apple has been using the collage method for quite awhile before it started to appear on Microsoft’s said poster.

App Store 500 Million Downloads

App Store 500 Million Downloads

App Store 1 Billion Downloads

App Store 1 Billion Downloads

App Store Turns 1

App Store Turns 1

So is Microsoft copying Apple? My take on it would have to be yes. I was a Windows user, since Vista, it has been giving me tons of problems. Problems that are better off solved with reformatting my hard drive, rather than spending countless hours going through and fixing files and registries, which is not a definite-problem-free solving method. I was convinced by a very persuasive, long time, childhood, friend, Keefe, to make the switch to a Mac. I was skeptical at first, mainly because of the price. But that bitch-ass mouth of his made me emptied my pockets to get this aesthetically pleasing piece of metal, a piece of metal that made me love computers all over again. Since the change, I never have the need to use a Windows based computer again. But under certain circumstances I will still have to face the dreaded Windows logo start button, which then I will go on ebuddy and start bitching about how my applications would crash unexpectedly. Or how it would take 3 minutes to start up Firefox because IE is piece of shit.

If Microsoft doesn’t stop with all the copycat business, we will probably be seeing things like these:

Microsoft Store Fifth Ave

Microsoft Store Fifth Ave

Zune Vending Machine

Zune Vending Machine