Saturday, May 18, 2013

Adding a windows (networked) printer on a Mac

1. Share the printer from Windows. Take note of the IP address and the name of the printer that is being shared.

2. Go to the mac, go to System Preference > Printers

3. Right click on the topbar and click 'customize toolbar' and drag 'Advance Options' to the toolbar

4. Click on Advance Options

5. Select "windows"

6. In the SMB path put the following:
smb://Aaron%20Tan:@/

Where Aaron%20Tan - is basically your windows username (replace space with %20 if there is space)
- is your password on windows
- as described e.g. 192.168.0.105
- as described in your shared settings on WINDOWS, e.g. Deskjet

7. Save. and try to print.. probably should also install the driver on the mac so that you can select the right type of device.

Tuesday, March 12, 2013

page_content.php
areas.php

Modify these two files to add new 'areas' for layout

Saturday, February 2, 2013

Running Crontab


/usr/bin/php /Applications/XAMPP/xamppfiles/htdocs/XXXX/crawl.php

Example :

cd /etc

crontab -e

Inside the crontab document:
48 * * * * /usr/bin/php /Applications/XAMPP/xamppfiles/htdocs/carmart/crawl-delta.php

Monday, December 24, 2012

watch "ps -xv | grep php"

Installing watch on mac


Download the “watch” command from Terminal.app
We are using “curl” a command line “broswer”
curl -O http://ktwit.net/code/watch-0.2-macosx/watch
Make “watch” executable
By doing this we tell Mac OS that this is a program that can run
chmod +x watch
Test the program
Let’s make sure everything is in working order.
./watch
Install “watch”
Optional: By following this next step we are placing watch into a system location that will allow you to run it from any location in the Terminal (You will be prompted for your password)
sudo mv watch /usr/bin/


Trying to run pconnect via terminal on MAC

Warning: mysql_pconnect(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock)

can be fixed with:


sudo su
ln -s /Applications/xampp/xamppfiles/var/mysql/mysql.sock /tmp/mysql.sock
mkdir /var/mysql
ln -s /Applications/xampp/xamppfiles/var/mysql/mysql.sock /var/mysql/mysql.sock

Saturday, October 20, 2012

Forex Exchange

Planning on a trip overseas and trying to understand the forex table that is on the back of all these money changers. But this is a cheat sheet to try to understand them:

Remember, buy and sell is always from the money exchanger point of view
     
Hence in Singapore,   
Buy Rate: The bank buying TWD (multiply)
Sell Rate: The bank selling TWD (divide)
     
Hence in Taiwan  
Buy Rate: The bank buying SGD (multiply)
Sell Rate: The bank selling SGD (divide)
     
At home, look for selling rate. Overseas look at buying rate.

Examples:

1. You are from Singapore going to Malaysia.
a. If you are changing money in Singapore, you will look at the 'sell rate' say it is 0.4013
b. You will then 'divide' by the amount you want to change say $100
c. So you will net: $100/0.4013 = $249.19 MYR

2. You are from Malaysia going to Singapore.
a. If you are changing money in Singapore, you will look at the 'buy rate' say it is 0.3987
b. You will then 'multiply' $100 * 0.3987 = $39.87 SGD