| Subcribe via RSS

Tutorial : Show hidden files in Finder Mac OSX

January 28th, 2010 | No Comments | Posted in Mac OSX

Unlike windows, Mac OSX has a different to show hidden files. We just can’t right click and show all files.

So, in Mac OSX we need to go to Terminal and put this command.
To open show all files

1
defaults write com.apple.finder AppleShowAllFiles TRUE

To disable show all files

1
defaults write com.apple.finder AppleShowAllFiles FLASE

And then kill all the Finder apps and start it up again.

1
killall Finder

Prototype : IE throws an error: “Object does not support this property or method”.

January 23rd, 2010 | No Comments | Posted in Javascript

I have been this problem for ages. How stupid am I? To resolve this problem just parse the element to $(element) before use. That’s it. The problem is IE doesn’t allow you to extend element.

Reference : http://proto-scripty.wikidot.com/faq#propnotsupported

Mac OSX Snow Leopard : How to find your DNS and change your hosts

January 11th, 2010 | No Comments | Posted in Mac OSX
1
cat /etc/resolv.conf

and change the hosts

1
cat /etc/hosts

Mastering Vi Common in just 10 minutes

January 5th, 2010 | No Comments | Posted in Knowledges, Mac OSX, Ubuntu

I have just finished my Unix exam. I know somebody hates VI very much, because it is very hard to use. It is so command-line, something like that. But learning to use this editor is very useful because you never know when will you unable to use X-Window or when will you face with command-line configuration.

So, just easing you in. VI is an editor in Unix and Unix-like system. It is command-line-based and very easy to use. You can learn its basics in just 10 minutes. VI has two modes; command mode and insert mode. Command mode is where you put your command and insert mode is where you put your text. Easy!

How to switch between two modes

1. In VI editor, press ESC to switch command mode, and press ESC again to insert mode. If you’re not sure, always press ESC two times, it will always be command mode. You will hear the beep sound.

How to insert text

1. In VI editor, press ESC two times to command mode, and press “i” or “a” and then type your text. “i” is insert, “a” is append your text

How to delete your text

1. In VI editor, press ESC two times to command mode, and where the cursor is press “x” to delete the character you want.

How to navigate in VI

1. In VI editor, you cannot use arrow keys in your keyboard to up, down, left or right. So how?, In VI editor, press ESC two times to command mode, and press “h” to navigate left, “j” to go down, “k” to go up and “l” to go left.

How to save and exit in VI

1. In VI editor, press ESC two times to command mode and then press “:wq” to save and exit the program.

See how easy is that, but VI is more than this you can read its documentation or visit this

ActionScript3 : Get WebCam to use in Flash CS3

January 4th, 2010 | No Comments | Posted in Flash

If you want to use camera or webcam in Flash CS3 or Flash CS4 for actionscript3. You can use actionScript3 to get camera and display in video symbol. I will just show the script, because it will be too easy for some expert Flash Developers :)

1
2
import flash.display.*;
import flash.geom.*;
1
 
1
2
3
4
5
var cam:Camera = Camera.getCamera();
var sizeX = cam.width;
var sizeY = cam.height;

cam.setMode( 544, 396, 25);
1
2
3
vid.attachCamera(cam); // attach the camera to video
vid.width = cam.width;
vid.height = cam.height;

While vid is your instance name of Video.

Note: For iSight for Mac users like me :) . You have to change a little bit in setting of camera in Flash Player. You have to choose USB Video Class Video.

iSight setting for Adobe Flash Player

Tutorial : Mac OSX install apache2

January 1st, 2010 | No Comments | Posted in Mac OSX

I have just got a Mac which I have been waiting for a long time. Finally, I got it!!!. However, there are lots of stuff I don’t quite understand and to get it done, because I was a PC for over 10 years. This article, I will be install apache2 in Mac OSX.

Install Gcc Compiler on Mac

1. Most websites that I googled don’t tell you this because I think every one should understand this one, but it’s not me. I will start with install gcc.
2. First go to https://connect.apple.com
3. Because every Mac haven’t got installed gcc compiler which is necessary to install apache.
4. Go to Download > Developer Tools and download, xCode
5. Install it!, now your system should have gcc compiler
6. Go to apache and download apache for Unix version.

How to install Apache on Mac

Download
1
$ lynx http://httpd.apache.org/download.cgi
Extract
1
2
3
$ gzip -d httpd-NN.tar.gz
$ tar xvf httpd-NN.tar
$ cd httpd- NN
Configure
1
$ ./configure --prefix=PREFIX
Compile
1
$ make
Install
1
$ make install
Customize
1
$ vi PREFIX/conf/httpd.conf
Test
1
$ PREFIX/bin/apachectl -k start

I copied this instructions from apache website because I don’t want to miss something!!!.
Reference: http://httpd.apache.org/docs/2.2/install.html