1. Font CSS Substitution Methods

    September 2, 2009 by J.P.

    font-image

    Many new methods of font substitution are coming of the wood work and old methods are now getting a second look.

    @font-face method

    The @font-face method was added to the CSS2 spec but then not recommended in CSS2.1. However with CSS3 it’s back and supported by most popular modern browsers. Read about @font-face at W3.org.

    This method requires the font being loaded on the server and will cause a slight flickering of the font rendering while it is stored in the cache. The plus side of this method is it’s easy to implement and requires no JavaScript.

    Here is an example of @font-face being used. Click Here

    Sample CSS code used (Note: font is stored on the server)

    @font-face {
    font-family: 'BrushScript';
    src: url('BrushScript.ttf') format("truetypefont");
    }
    /* for IE */
    @font-face {
    font-family: 'BrushScript';
    src: url(BrushScript.ttf);
    }
    body {
    font-family: 'BrushScript', helvetica; /*degrades to a standard web font if unavailable */
    font-size:1em;
    }

    Cufon JavaScript Method

    This currently my personal favorite method. No font is stored on the server and there is no flicker of the font while loading. The wizard also provides many options and settings so you can customize the needs for your site.

    Easy to add

    Cufon provides a simple method for converting fonts on your local machine into a js file that you include in the header along with the Cufon script. A simple replace call is used to substitute the font. Read more about Cufon here

    Example of the Cufon Method »

    Example Header Code

    <script src="cufon-yui.js" type="text/javascript"></script> <script src="AGaramondPro_400-AGaramondPro_700-AGaramondPro_italic_400.font.js" type="text/javascript"></script>
    <script type="text/javascript">Cufon.replace('h1');Cufon.replace('p');</script>

    Background Image method

    This method is good for replacing a few headers and best method to use with the logo of your site. Detailed px to px cross browser look with the design is needed while the code remains semantic. This method has been implemented in this version of my site since for major section H1 headers and the logo of the site.

    XHTML Example Code

    <h3 id="Portfolio">Portfolio</h3>

    CSS Example Code

    h3#Portfolio
    {
    background:url('/portfolio/2009/gfx/title_portfolio-trans.png') no-repeat;
    text-indent: -9999px;
    width:229px;
    height:61px;
    }

    This will work with all browsers. A list will be added shortly of the other methods and their support.


  2. CSS Adjacent Sibling Combinators With Text

    August 26, 2009 by J.P.

    siblings_01
    Here is a short and sweet post demonstrating the use of adjacent sibling combinators with text is an easy way to work with unique spacing with headers and copy in general.

    Basic Example Code
    h1 + p{
    padding:20px 0 0;
    }
    h2 + p{
    padding:0px 0 0;
    }
    h3 + p{
    padding:0px 0 0;
    }

    Here is a link with 3 different headers and style demoing how convenient this approach is.

    Eaching header has a unique spacing when followed by a <p/> tag.


  3. How to Swap Asus 1005HA Wifi Card OSX10.5

    August 22, 2009 by J.P.

    Before we begin I want to tell that you are doing this at your own risk and this will be voiding the warranty of your netbook.

    Here are a list of compatible cards I have seen mentioned online but I have only tested and verified the Dell 1510.

    • Dell 1510 Tested and working with 10.5.8
    • Dell Wireless-N DW 1500 mini PCI
    • Any Broadcom mini PCI
    • If you know of more comment or email me and I’ll update.

    Steps for card installation

    IMG_0034

    Ground yourself so you don’t short anything internally

    IMG_0035

    Flip the machine over and remove the battery

    Remove the ram cover, ram, and the silver screw.

    Remove the 4 screws in each corner

    Flip the machine back over and open the lip.

    Time to remove the keyboard

    IMG_0036

    The keyboard is held in place by 4 tabs the top directly above the F1, F6, F10, and Insert.

    With a flat head screwdriver or something else very thin click each tab and the keyboard will popout slightly.

    Once popped out slowly pull it out from top corn to top corner. (Warning there is a ribbon connecting the keyboard to the track pad so don’t just rip it out like a gorilla.)

    IMG_0038

    Once the keyboard is loose lift it up from the bottom to expose the ribbon connector. If you haven’t worked with ribbon connections before don’t worry it ain’t no thing. It was my first time to and after about 30 secs I had it under control.

    To release the ribbon you will see 2 black connectors on the left and right side. Carefully push them out towards the monitor.

    The ribbon should immediately release.

    Cool keyboard is out now time for the fun part.

    Remove the 6 screws that are holding the shell and trackpad.

    IMG_0039

    Once all 6 have been removed flip the trackpad, blue ribbon connector up. (Note this ribbon connection is different then the keyboard connector. It needs to be flipped up).

    Once screws and ribbon have been removed and released start prying thing case off. This is a major pain in the ass and you have to be a gentle giant not to just hulk the top off and break the plastic clips. I would recommend using a credit card and run it around the entire crease to help loosen things up. You will also have to focus on the tabs that are under display. There are 4 in total and harder then the rest of the tabs to loosen up.

    Once the top is off you will see all the internal components of the machine. I celebrated with a beer at this point.

    IMG_0044

    To access the wifi card you will need to release the ribbon for the SD card reader which is another flip up like the trackpad.

    Once the cable is out of the way simple unscrew the wifi card and it should become very loose and easy to pull out of the board. Gently tug the antenna off the wifi card. Removal complete.

    IMG_0050

    Get your OSX 10.5 compatible card, connect the antenna to it and insert it back in the board. Once the card and antenna are secure and screwed in reconnect the SD card ribbon.

    Rebuilding

    • Re-secure the case and make sure you have enough slack to connect the trackpad ribbon.
    • Flip the ribbon connector down making sure the ribbon is fully connected.
    • Fasten the keyboard ribbon back in and drop it back into the case starting with the bottom.
    • Flip the case back over and install the remaining screws, ram, and battery.

    Wifi Card Installed Time to See if It’s Working!

    I fumbled a few times at this stage and missed something very basic that sent me into a kext loop that wasn’t needed.

    While booting the machine go into the Ausu bios and make sure that WLAN is enabled. My wasn’t and I thought the 10.5.8 upgrade had broken the ability for the card to connect to a network.

    I booted in Chameleon with -v -f and noticed a few lines of code showing the airport id and that the card was enabled. I think they are displayed right before all the voodoo.kext files load.

    Another good sign that the card is working will be the blue wifi light always active on the bottom right of the machine.

    OSX should immediately recognize the card. My system acted a little funky until I did a restart. Menus were bouncing around and keyboard and trackpad weren’t working. I also doubled checked that my ribbons were securely fastened.

    After restarting everything was back the system was back to normally and I was connected to my router.

    Possible Things to Trouble Shoot

    Many people have had wifi issues after upgrading to 10.5.8. Apparently Apple stopped supporting certain cards. Here is a kext from 10.5.7 that should enable the support of your card if it was working in 10.5.7.

    Good luck with the card swap.


  4. CSS Attribute Selectors

    August 20, 2009 by J.P.

    computer_controls

    CSS Attribute selectors are a great way to target specific elements in your page and apply styles to them with out have go back and opening up the template file and changing code.

    I find them extremely useful for creating form css.

    There are 6 different types of attribute selectors

    • [att=value]
      The attribute has to have the exact value specified.
    • [att~=value]
      The attribute’s value needs to be a whitespace separated list of words (for example, class=”title featured home”), and one of the words is exactly the specified value.
    • [att|=value]
      The attribute’s value is exactly “value” or starts with the word “value” and is immediately followed by “-”, so it would be “value-”.
    • [att^=value]
      The attribute’s value starts with the specified value.
    • [att$=value]
      The attribute’s value ends with the specified value.
    • [att*=value]
      The attribute’s value contains the specified value.

    Here is an example page where I have formatted elements with attribute selectors only.

    Sample CSS Used

    <style type="text/css" media="screen">
    p[tile='para1'] {
    color:red;
    }
    input[type="text"] {
    width: 200px;
    background-color: #DDD;
    border:0px;
    display:block;
    padding:3px;
    }
    input[type="submit"] {
    width: 200px;
    background-color: #000;
    border:0px;
    display:block;
    padding:5px;
    color:#fff;
    margin-top:5px;
    }
    a[href$='.jpg']{
    background:green;
    color:#fff;
    }
    </style>


  5. Work with PHP5 locally on your Mac

    August 12, 2009 by J.P.

    phpimage

    Here are few quick steps to turn on PHP5 on your mac. This an easy modification allowing you to work with in your WebServer folder.

    Note: To use this method 10.5+ is required.

    • With your favorite text editor (I recommend Textmate) open Macintosh HD/private/etc/apache2/httpd.conf. You must allow hidden files to be seem to view and open.
    • Once the httpd.conf file has been opened go to line #114 and edit the following #LoadModule php5_module      libexec/apache2/libphp5.so remove the “#” sign and save the file. You will be prompted to enter root password.
    • With Terminal open, type the following series of commands, each followed by Return:
      cd /private/etc
      sudo cp php.ini.default php.ini
    • Now open the file with your text editor.
    • Go to line #305 and change “error_reporting = E_ALL & ~E_NOTICE” to error_reporting = “E_ALL” and save the file and enter your root password.
    • Open your System Preferences click on Sharing and then turn on Web sharing.

    After the above steps have been completed PHP5 will be working with in your WebServer folder located in “Macintosh HD/Library/WebServer/Documents”.

    To confirm everything has been configured correct create a php file with the following:

    • <?php phpinfo(); ?>
    • Save the file with the documents folder as info.php.
    • In a browser window go to: http://localhost/info.php and you will see your php settings.

  6. Asus 1005HA Hackintosh

    August 11, 2009 by J.P.

    IMG_00312

    Here are the steps to install 10.5.8 OSX iDeneb on an Asus 1005HA. This installation requires you to have another OSX machine and either a USB key 10gigs + (recommend 16gig) or an external DVD drive.

    Pre-installaton Downloads

    • iDeneb (for my installation I used 1.4 10.5.6 OSX). Recommend grabbing the latest here.(you must register to download from the site)
    • ACPIFix.pkg to get around an error that freezes the loading of OSX. Get it here.
    • iDeneb upgrades.
    • Kext files needed to get resolution and Quartz Extreme working, audio, battery, sleep and more working. Click here.
    • GernericCPUManagement app.
    • Kext Helper. This is built into iDeneb in the customize package.
    • Chameleon 2, should be in in the latest build of iDeneb or grab it here.
    • Spark, so you can have volume control + many more features. Grab it here.

    If you need help creating a bootable USB drive click here.

    Install iDeneb 1.4 on your machine

    (The below will assume you are booting from a USB drive)
    1. Boot to your USB drive by hitting ESC when bios loading screen comes up.
    2. Select you USB drive from the list.
    3. iDeneb should load Chameleon as this point.
    4. Once the install wizard comes up follow the steps that you would for any normal installation.
    5. Make sure you formatted the drive on the 1005ha. By default mine came in 4 separate partitions which I erased and reformatted into a single OSX (journaled).
    6. In the customize setting of the install select the following: ICHx Fixed, FireWire Remove, Video/Intel and check GMA950, Applications KextHelper, found in Applications/iDeneb/Kexthelp.app.

    After 10.5.6 iDeneb has been installed

    • After install hit esc and boot to the USB drive.
    • Once Chameleon loads hit F8 then type the following: “rd=disk0s1 -v -f” and hit return.
    • It will take a couple minutes but you should see OSX wizard for setting up your admin user account.
    • After filling out the wizard install the ACPIFix.pkg.
    • Once the package is installed restart the machine.
    • Do not hit esc this time and allow the internal HD to boot.
    • Once Chameleon loads hit “F8″ then type “-v -f”.
    • If all goes well at this point 10.5.6 should load with 800×600 screen res, which we will fix later.

    Update 10.5.7 with iDeneb pkg

    • Install the 10.5.7 upgrade from the pkg download.
    • Restart once the upgraded has been installed.

    Update 10.5.8 with iDeneb pkg

    • Install the 10.5.8 upgrade from the pkg download.
    • Restart once the upgraded has been installed.

    Installing the Kext for Audio, Display, Etc

    • Once 10.5.8 is successfully loaded install the kext files and packages list at the top of this post. Note all kext files must be installed using the Kext helper app or a smilar method, terminal command, or OSX86 Tools.
    • Recommend installing a few at a time and then restarting to determine where an issue could be happening if anything strange happens.
    • Install the GenericCPUPMControl.app and have it start at login and keep hidden (these setting are in login options). Also note that voodooPower.kext is required for this to work properly.

    Finishing touches

    • Get Spark.aap, it’s an app to get shortcut keys working, like for volume function keys Spark.app.
    • Install about this mac. Download.
    • Webcam is working. If you are having issues I recommend reinstalling some of the display kext since Quartz Extreme needs to be running.

    Features I haven’t tested

    Mic. Not sure if the mic is working or not.

    Once wifi is up and running I will update this section and post Skype configuration. The wifi card, Atheros AR9285 that comes with the 1005ha isn’t supported yet. From what I’ve read it might possibly be supported in 10.6 Snow Leopard. I’m still waiting on my card to get here from Hong Kong and plan on doing a followup post on how to take the 1005ha apart and replace the existing wifi card with a supported card. A separate post will be on this subject in 10-15 business days.

    Gesture support. I’m assuming that this will be supported by a kext at somepoint since its supported in windows.

    Please post any issues with your install below and I will do my best to answer.

    Special thanks the irc.mac.speak.net OSX86 chat room for everyone’s help and input.


  7. Asus 1005HA Hackintosh

    by J.P.

    IMG_00312

    Here are the steps to install 10.5.8 OSX iDeneb on an Asus 1005HA. This installation requires you to have another OSX machine and either a USB key 10gigs + (recommend 16gig) or an external DVD drive.

    Pre-installaton Downloads

    • iDeneb (for my installation I used 1.4 10.5.6 OSX). Recommend grabbing the latest here.(you must register to download from the site)
    • ACPIFix.pkg to get around an error that freezes the loading of OSX. Get it here.
    • iDeneb upgrades.
    • Kext files needed to get resolution and Quartz Extreme working, audio, battery, sleep and more working. Click here.
    • GernericCPUManagement app.
    • Kext Helper. This is built into iDeneb in the customize package.
    • Chameleon 2, should be in in the latest build of iDeneb or grab it here.
    • Spark, so you can have volume control + many more features. Grab it here.

    If you need help creating a bootable USB drive click here.

    Install iDeneb 1.4 on your machine

    (The below will assume you are booting from a USB drive)
    1. Boot to your USB drive by hitting ESC when bios loading screen comes up.
    2. Select you USB drive from the list.
    3. iDeneb should load Chameleon as this point.
    4. Once the install wizard comes up follow the steps that you would for any normal installation.
    5. Make sure you formatted the drive on the 1005ha. By default mine came in 4 separate partitions which I erased and reformatted into a single OSX (journaled).
    6. In the customize setting of the install select the following: ICHx Fixed, FireWire Remove, Video/Intel and check GMA950, Applications KextHelper, found in Applications/iDeneb/Kexthelp.app.

    After 10.5.6 iDeneb has been installed

    • After install hit esc and boot to the USB drive.
    • Once Chameleon loads hit F8 then type the following: “rd=disk0s1 -v -f” and hit return.
    • It will take a couple minutes but you should see OSX wizard for setting up your admin user account.
    • After filling out the wizard install the ACPIFix.pkg.
    • Once the package is installed restart the machine.
    • Do not hit esc this time and allow the internal HD to boot.
    • Once Chameleon loads hit “F8″ then type “-v -f”.
    • If all goes well at this point 10.5.6 should load with 800×600 screen res, which we will fix later.

    Update 10.5.7 with iDeneb pkg

    • Install the 10.5.7 upgrade from the pkg download.
    • Restart once the upgraded has been installed.

    Update 10.5.8 with iDeneb pkg

    • Install the 10.5.8 upgrade from the pkg download.
    • Restart once the upgraded has been installed.

    Installing the Kext for Audio, Display, Etc

    • Once 10.5.8 is successfully loaded install the kext files and packages list at the top of this post. Note all kext files must be installed using the Kext helper app or a smilar method, terminal command, or OSX86 Tools.
    • Recommend installing a few at a time and then restarting to determine where an issue could be happening if anything strange happens.
    • Install the GenericCPUPMControl.app and have it start at login and keep hidden (these setting are in login options). Also note that voodooPower.kext is required for this to work properly.

    Finishing touches

    • Get Spark.aap, it’s an app to get shortcut keys working, like for volume function keys Spark.app.
    • Install about this mac. Download.
    • Webcam is working. If you are having issues I recommend reinstalling some of the display kext since Quartz Extreme needs to be running.

    Features I haven’t tested

    Mic. Not sure if the mic is working or not.

    Once wifi is up and running I will update this section and post Skype configuration. The wifi card, Atheros AR9285 that comes with the 1005ha isn’t supported yet. From what I’ve read it might possibly be supported in 10.6 Snow Leopard. I’m still waiting on my card to get here from Hong Kong and plan on doing a followup post on how to take the 1005ha apart and replace the existing wifi card with a supported card. A separate post will be on this subject in 10-15 business days.

    Gesture support. I’m assuming that this will be supported by a kext at somepoint since its supported in windows.

    Please post any issues with your install below and I will do my best to answer.

    Special thanks the irc.mac.speak.net OSX86 chat room for everyone’s help and input.


  8. How to Create a Bootable OSX USB Key

    August 7, 2009 by J.P.

    vintage-color

    I recently purchased the Asus eee pc 1005HA and needed to install OSX (actually on this machine I chose the iDeneb method). While working on a tight budget for this project I didn’t want to drop an extra $70 or so dollars for an external dvd drive. Instead I opted for a 16gig key drive that ended up costing around $30 and will definitely be put to use way more the a dvd drive.

    Below are the instructions on how to get OSX on the key and have it bootable for installation. I’ll walk through the OSX method and the OSX86* method for you Hackintosh fiends.

    OSX 10.6 method for bootable USB key install

    1. Insert your retail DVD into drive.
    2. Plug in usb key. I recommend getting at least a 16gig drive so you don’t run into capacity issues.
    3. Open Disk Utitlity. Locatied in Applocations/Utitilties/DiskUtitily.app
    4. Partition the USB drive and select GUID in the options so it will be bootable on a Mac.
    5. Select restore and drag the image of the DVD on the left into the input path.
    6. Drag the USB drive into the destination drive.
    7. Click the restore button.
    8. Sit back and relax cause you will be waiting for about 20-30 mins for the key to be formatted properly.

    This method will also work on 10.5.

    OSX86 Method (Tested with iDeneb ISO)

    1. Insert your retail DVD into drive.
    2. Plug in usb key. I recommend getting at least a 16gig drive so you don’t run into capacity issues.
    3. Open Disk Utitlity. Locatied in Applocations/Utitilties/DiskUtitily.app
    4. Partition the USB drive and select MRB in the options so it will be bootable on a Mac.
    5. Select restore and drag the image of the DVD on the left into the input path.
    6. Drag the USB drive into the destination drive
    7. Click the restore button
    8. Waiting for about 20-30 mins for the key to be formatted properly
    9. Once the USB drive have been formated you need to make it bootable with Darwin.
    10. Download OSX86 Tool Here.*
    11. Run OSx86 Tools, click install EFI/Run FDISK, choose to install PC EFI 8 on your USB Drive.

    Note*: Some OSX86 users may encounter errors using OSX86 Tool. For my Asus eee pc 1005ha I had to use PC EFI v9, which worked fine. You can grab it here.


  9. Use Textmate to Compose email with OSX Mail

    July 27, 2009 by J.P.

    mailtextmate

    Recently I started using Textmate for more things then just coding websites since thats bascially the tip of the iceburg then it comes to the most powerful editor on the mac.

    If you interested in trying something new with Textmate here are basic instructions to use texmate to compose messages with OSX mail.

    1. Make sure you have installed the “Edit in Textmate” Bundle. This is found in “Bundles>Textmate>Install Edit in Textmate bundle.
    2. Once the bundle has been installed you will be able to edit your email message in text by hitting the following short cut keys “Control + Command +E” or optionally going to the edit menu in Mail and the very last option will be “Edit in Textmate”.
    3. Once you the command has been keyed a blank Textmate text file will be opened.
    4. Type your email message and then save. If your done editing the email you can close the Textmate window and you will see your message in message window of the Mail app.

    Other Mail features you can with Mail

    • Increase quote level “> or shift+.”

  10. HTML 5 Wordpress Theme (Naked)

    July 17, 2009 by J.P.

    naked

    Here is an updated version of the Naked Wordpress theme to support HTML5.

    Wordpress Naked has been put together by us as a simple Wordpress theme to assist developers that need to quickly implement a blog using Wordpress but don’t really have the time to spend looking under the hood in any detail or reading documentation when it comes to applying a custom theme (e.g. their clients’ design).

    Find out more about the original theme.

    Download HTML5 Theme



Older Posts »