Archive

Posts Tagged ‘Mac’

{less} is more…

June 18, 2010 2 comments

I came across this awesome tool today and thought I would share my experience with others…

 

 

3 Steps to writing {less}

1. Setup
1.1 Install the less Ruby gem by opening up “Terminal” and typing in one line.

1.2 Download the {less}.app.

 

 

2. {less} App Usage

 2.1 Drag your css folder into the “Watched Folders” section.

2.2 Switch to the “Compiler” tab and turn on “Automatically compile files when saved”.

Coda Side-Note: There is a {less} plugin for Coda if ya don’t mind first having to create a “Site” in your sites section first.

 

 

3. {less} Usage
3.1 Overview

Basic workflow of {less}:
1. Edit “.less” files.
2. Save file -> as you save, the {less}.app automatically generates the “.css” file.
Tip: If you have Growl, it will notify you when it has finished.
3. Review your web page.

My demo site is structured and looks like so:

 

3.1 Import & Variables

* You can start to create reusable CSS libraries by using the “@import” syntax.

* Variables can be used to store CSS attribute values to be reused throughout your project so as to alleviate the trouble with core changes.

 

3.2 “Mixins”

Yeah, it doesn’t automatically mix sense just yet, but it’s quite simple actually…

I would like my “.panel” class to have rounded corners; so I’m going to “mix” or add the rounded corners styling by simply adding its CSS class name (“.rounded-corners”) to my “.panel” class:

 

3.3 “Nesting stuff”

You can basically use this to nicely organize your CSS and type less ( excuse the pun ); I only have one item nested but imagine if you had more!…

 

3.4 Operations

If you got a special magic formula, you can implement it with basic operations even if there is a unit of measurement (e.g. px, em, etc.).

 

 

All The Files


Summary

{less} is a pretty neat addition to any web designer/developers arsenal.

I left out “Namespaces & Accessors” and a little more as I always believe that one should have at least one look at the official docs… you can find all the {less} techniques here: http://lesscss.org/docs.

Hope this has helped you on your way to writing {less}; until next time, keep writing more, or {less}. :D

 

TM

Awesomeness lies in the hands of the brave.

Posted via web from TigerMunky’s Grrreat Trek

Categories: Tech, Tips, Tools Tags: , , , , , ,

Manually Installing PHPUnit with MAMP on Snow Leopard (3rd time is a charm)

October 9, 2009 Leave a comment

 

After scouring the web for awhile and having problems with installing PHPUnit with PEAR and MAMP, I figured it out, so I thought I would share…

1. Get a copy of the latest version of PHPUnit (PHPUnit 3.4.1 – 8 Oct 2009) here ~ http://pear.phpunit.de/get/

2. Extract your folder to your desktop.

3. Edit “phpunit.php” found in “PHPUnit-3.4.1/PHPUnit-3.4.1/”.
3.1. Scroll near to the bottom and replace “@php_bin@” with “/Applications/Mamp/bin/php5/bin/php”.

3.2. <Save As> “phpunit” (*Notice no extension used.) in “/usr/local/bin/”, or save to your Desktop, then copy to “/usr/local/bin/”.

[ Side Note: if you want to reveal hidden files and folders in Finder, you may type this in the Terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE

then

killall Finder

to "reboot" finder (Note: this will close all your Finder windows and reopen all of them)
you can use FALSE instead of TRUE to return it back to "normal".

]

3.3. Make the file (phpunit) executable by typing the following in the Terminal:

sudo chmod +x /usr/local/bin/phpunit

4. Edit ”PHP.php” found in “PHPUnit-3.4.1/PHPUnit-3.4.1/PHPUnit/Util/”.
4.1. Scroll about 3/4 near the bottom and replace “@php_bin@” with “/Applications/Mamp/bin/php5/bin/php”.

4.2. Save the file. Copy “PHPUnit-3.4.1/PHPUnit-3.4.1/PHPUnit” folder to “/usr/lib/php/”. That’s it!

5. Test it out by making a Test anywhere, here is some sample code you can plonk into “HowsitWorldTest.php”.

<?php

class HowsitWorldTest extends PHPUnit_Framework_TestCase
{
public function testHowsit()
{
$this->assertTrue(1 == 1);
}
}

?>

6. Open up your Terminal to where your test (HowsitWorldTest.php) is located.

7. Type “phpunit HowsitWorldTest”. Hopefully you will see the following:

TM

“It’s only work if somebody makes you do it”

Posted via email from TigerMunky’s Grrreat Trek

Categories: Life, Tech, Tools Tags: , , , ,

OS X Tip: Me and emptying the trash really slowly ( securely )

August 31, 2009 Leave a comment

Funny thing I discovered about trashing things with OS X the other day with a good mac buddy of mine…

For quite some time, I had wondered why my mac took soo long to empty the trash. By comparing my settings with my mac buddy’s mac, I was able to discover that I had left the option “Empty Trash securely” on the whole time! (I do remembered a time when I was playing around with finder options and turned it on to see what would happen without reading about it, lol) You think I could have checked this earlier?! Oh well, at least I know all my past deletes are definitely gone…

 

Why “Securely empty your trash”?

Very simply, it for those of us that are a little more paranoid than the rest. If you empty your trash securely, OS X not only removes your file from your drive but writes meaningless data over the same area several times to make sure it is not there. What this means, is that data recovery people cannot recover anything from your drive. I’m not a recovery expert but usually when you delete your files (even empty them from trash), a good portion of it is still recoverable, this is the same for PC users as well.

 

How to turn on/off the “Empty Trash Securely” option…

1. Make sure Finder is selected.

2. Go to the Finder Menu and select the option “Preferences…”

3. Select the “Advanced” tab

4. Check/uncheck “Empty Trash securely”

My response to this guy’s blog article …

August 20, 2009 1 comment

My response to this guy’s blog article (5 Reasons Macs Can’t Claim They’re Better than Windows 7): http://www.networkworld.com/community/node/44512

Honestly, you are not comparing “apples with apples” (I also intended on using that pun ; )…

In terms of software, right now, you should be comparing Windows 7 (release 2009) with OS X Snow Leopard (released 2009), NOT anything less than Leopard (released 2007) or Tiger (released 2005) which is how you are currently comparing which is like old apples to thick glass windows(older ones were more fragile)…

In terms of hardware, you have to split your analysis into 2 groups: Desktop and Laptop…

[ From perspective of doing it yourself ]
>[ I use this perspective because cost of hiring depends on who you know-e.g. a mac buddy of mine will help me out for free as opposed to the Apple store, or a windows buddy will help me out for free as opposed to the local pc repair guys ]
>[ You will have different situations for needing repair, some will cost more than others ]
>[ Your reason for needing repair will differ, some people are more careless than others, so you can't work factually on cost as there are a lot of factors. ]
>[ e.g. I can make a stupid statement like this: My Linux box has never failed me once but my Windows PC's and Mac's fail me all the time. The Win and Mac machines could have failed due to spilling liquids over them whilst the linux box is tucked away nicely in the corner doing its thing ]
>[ and you can't work on service with a smile cos that depends totally on the person that you meet, their circumstance and current emotional state although, I do find people in a Apple Store more friendly cos they have higher standards and customer protocols to follow, that and they are probably eager to get your business and possibly charge you a bit if you don't know anyone better... PC people, depends where you buy from but all in all, they really don't care cos they don't usually wanna fix some else's mess, e.g. try sending in a PC with linux installed to a Windows only experienced place, they will be like eh? ]

Desktop’s are initially cheaper to buy and upgrade than Mac’s but I could be wrong as I can’t say that I’ve opened up or tried to upgrade an Intel Mac. Not sure if some parts like the CPU, graphics card and motherboard are custom built for Mac, so… but things like hard drives, RAM are same. Then again, if I try to find PC hardware that match the Mac hardware design, then the pricing differs. e.g. Mac Mini compared to an AOpen Mini… I actually can’t get an AOpen but when I did look at price, it was comparable to the Mac Mini, only slightly less – and the easy upgrading can’t apply to it as the parts of the AOpen mini are also specific (have u seen one, they’re tiny)

If you compare a typical desktop with an iMac for instance, you really can’t find a PC that has a “screen and box” readily available that is easy to pack and redeploy (did I mention it takes less desk and or floor space :P ), sure you could buy and upgrade the PC components cheaper (correct me if I’m wrong) but you just can’t buy design right now. Apple currently has more experience in that arena, so anything they make, they will have more time to perfect than anyone trying to create something similar.

Laptops: less face the fact, ALL laptops are not easily upgradeable. ALL become obsolete. ALL laptops that you compare will cost you. Having said that, what is it that “Apple Laptops” have that PC’s don’t… it’s all the little things really…
like the keyboard lighting, the backlit screen, the magnetic power plug, the long life of the battery [you can get 3hrs when its says 3hrs, well, 5-8hrs with the new ones], the quality of the finish (doesn’t easily fade with your sweat [eww], the size, the noise of the fans is minimal, the heat from the fan can’t be felt by the person next you, the standby time is uber fast when shutting and opening the lid, the parts are sturdy [ever have jiggly parts? Lol], the hardware carries with it “prestige” if you are into that typa thing. Like me offering you a Sony or an Acer laptop, which would you see as a more “professional” or cool brand?

Back to software and your points…

UI – In terms of default windows that comes with your OS, I actually prefer OSX’s as it gives you a feeling of unity and stability. Windows glass effect reminds of how fragile glass is, so not so many good connotations or feelings with that. Now even though I am currently a Mac fan, I do remember how I enjoyed the freedom of customizing UI in Linux, it used to be a programmer geeky thing but now it is way easier with all the crazy stuff those same programmers have added, here’s an example, skip past the halfway mark if you get bored… http://www.metacafe.com/watch/434675/windows_vista_aero_vs_linux_ubuntu_beryl/

Windows crashes more – this statement like previous commentators have said, depends on what you do or do not do. Taking into account tons of other external factors like factory faults, etc. Sorry to the dude with the bad first mac experience.

Flexible and Lower cost – Yes, I can’t argue with that… you can really build a cheap Desktop PC or a PC for less but you have to remember what you pay for, it is not like Apple hardware, think like previous examples above in terms of design, sure performance but design, never.

Windows 7 Security Is NOT Better Than OSX Snow Leopard – Firstly, pick the correct Apple OS to compare! Secondly, you say it yourself: “While it is true that Windows is still a much larger security target because of it’s market share, it isn’t true that the Mac doesn’t have plenty of security issues of its own.” Thirdly, your reasons are just opinion!

From my own experience and you may ask any OS X, Linux and other NiX users that they have felt more of a weight lifted off their shoulders when browsing a file network or internet than on Windows!!!

Ahem but specifically in terms of Win and Mac comparisons, I can honestly say that in my time of using a Mac, I have had no down time with Mac’s due to viruses, key loggers, worms, etc… Windows on the other hand, plenty and I’m sure Win 7 won’t see much change. Don’t forget that you have to have an anti-virus installed. I’ve lived without one on my Mac so far (that goes for Linux too :P )

So in the end, “Macs” can technically claim all because technically, you aren’t comparing “apples with Apple’s” : )

Follow

Get every new post delivered to your Inbox.