your baddie teddie since 1983.

Tag: mac

Apple Service Centers in Singapore

apple-service-center

Looking for authorised service center for your Apple products in Singapore?

Below is a list of service centers (as at April 2017) for sending in your Apple products.

Name and LocationProduct service
1A.LAB@PS

PLAZA SINGAPURA, 68 ORCHARD ROAD, #04-12B
SINGAPORE 238839
+65 6784 1318
Mac,iPad,iPhone,Apple Watch, Apple Watch Sport,Apple Watch Edition,iPod,Apple TV,Beats
2QCD@WL

WHEELOCK PLACE, 501 ORCHARD ROAD, #05-13/14
SINGAPORE 238880
+65 6555 0500
Mac,iPad,iPhone,Apple Watch, Apple Watch Sport,Apple Watch Edition,iPod,Apple TV,Beats
3QCD@TH

8@TRADEHUB21(FACING MAINROAD), #02-08, NO.8, BOON LAY WAY
SINGAPORE 609964
+65 6515 2010
Mac,iPad,iPhone,Apple Watch, Apple Watch Sport,iPod,Apple TV,Beats
4A.LAB@CCP
CHANGI CITY POINT, 5 CHANGI BUSINESS PARK CENTRAL 1, #01-55
SINGAPORE 486038
+65 6784 1318
Mac,iPad,iPhone,Apple Watch, Apple Watch Sport,iPod,Apple TV,Beats

For booking of appointment with QCD, go here.
For booking of appointment with A.Labs, go here.

Linux / Unix / Mac crontab – how to add, install or list jobs

Different Types of cron Configuration

There are two different types of configuration files:

  1. The UNIX / Linux system crontab : Usually, used by system services and critical jobs that requires root like privileges. The sixth field (see below for field description) is the name of a user for the command to run as. This gives the system crontab the ability to run commands as any user.
  2. The user crontabs: User can installer their own jobs using the crontab command. The sixth field is the command to run, and all commands run as the user who created the crontab

How Do I Install / Create / Edit My Own Cronjobs?

To edit your crontab file, type the following command at the UNIX / Linux shell prompt:
$ crontab -e

Syntax of crontab (Field Description)

Your cron job looks as follows for user jobs:

 1 2 3 4 5 /path/to/command arg1 arg2

OR

 
1 2 3 4 5 /root/backup.sh

Where,

  • 1: Minute (0-59)
  • 2: Hours (0-23)
  • 3: Day (0-31)
  • 4: Month (0-12 [12 == December])
  • 5: Day of the week(0-7 [7 or 0 == sunday])
  • /path/to/command – Script or command name to schedule

 

Easy to remember format:

* * * * * command to be executed
- - - - -
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)

 

Your cron job looks as follows for system jobs:

1 2 3 4 5 USERNAME /path/to/command arg1 arg2

OR

1 2 3 4 5 USERNAME /path/to/script.sh

Example: Install Backup Job Script

If you wished to have a script named /root/backup.sh run every day at 3am, your crontab entry would look like as follows. First, install your cronjob by running the following command:
# crontab -e
Append the following entry:
0 3 * * * /root/backup.sh
Save and close the file.

More Examples

To run /path/to/command five minutes after midnight, every day, enter:

5 0 * * * /path/to/command

Run /path/to/script.sh at 2:15pm on the first of every month, enter:

15 14 1 * * /path/to/script.sh

Run /scripts/phpscript.php at 10 pm on weekdays, enter:

0 22 * * 1-5 /scripts/phpscript.php

Run /root/scripts/perl/perlscript.pl at 23 minutes after midnight, 2am, 4am …, everyday, enter:

23 0-23/2 * * * /root/scripts/perl/perlscript.pl

Run /path/to/unixcommand at 5 after 4 every Sunday, enter:

5 4 * * sun /path/to/unixcommand

Task: List All Your crontab Jobs

Type the following command :

# crontab -l
# crontab -u username -l

To remove or erase all crontab jobs use the following command:

# crontab -r
crontab -r -u username

 

adapted from cyberciti.biz

How to edit host file on Mac OSX Leopard/Snow Leopard/Lion

Introduction

The hosts file is a text file that maps hostnames to IP addresses.
Upon typing a url address on the browser, the system will first check if there is a relevant entry on the hosts file and gets the corresponding IP address, else it resolves the IP via the active connection’s DNS servers.

The hosts file can be edited to block certain hostnames (like ad-serving/malicious hosts), or used for web development purposes, i.e. to redirect domains to local addresses.

Editing the hosts file

Editing the hosts file in Mac OS X, is a pretty easy task, especially if you are familiar with the terminal. (Tested on Leopard/Snow Leopard/Lion)

Step 1 – Open the Terminal.app

Either by typing “Terminal” on the Spotlight, or by going into Applications -> Utilities -> Terminal.

Step 2 – Open the hosts file

Open the hosts file by typing on the Terminal that you have just opened:

$ sudo nano /private/etc/hosts

Type your user password when prompted.

Step 3 – Edit the hosts file

The hosts file contains some comments (lines starting with the # symbol), as well as some default hostname mappings (e.g. 127.0.0.1 – localhost).
Simply append your new mappings underneath the default ones. Or edit one of the default values if you know what you are doing!
You can navigate the file using the arrow keys.

Step 4 – Save the hosts file

When done editing the hosts file, press control-o to save the file.
Press enter on the filename prompt, and control-x to exit the editor.

Step 5 – Flush the DNS cache

You can issue a simple Terminal command to flush the DNS cache, and have your host file changes to take immediate effect:

$ dscacheutil -flushcache

And you’re done!

© 2025 eddie

Theme by Anders NorenUp ↑