1. Insert CD/DVD

2. Open a terminal window and use the following command to determine your DVD device:

$ drutil status
Vendor Product Rev
HL-DT-ST DVDRW GSA-S10N AP09


Type: DVD-ROM Name: /dev/disk1

3. Umount the disk with the following command:

$ diskutil unmountDisk /dev/disk1
Disk /dev/disk1 unmounted

4. Use the dd command to create the ISO file:

$ dd if=/dev/disk1 of=file.iso bs=2048

5. Mount the ISO file to verify that it is readable:

$ hdid file.iso

If you’re looking for a utility to allow you to read ISO files on the Windows platform, try Virtual Clone drive from SlySoft.

 

Using rsync over ssh

You can securely synchronize directory structures between two Linux computers by using the following command:

rsync -ave ssh --delete myhost.example.com:Documents/ Documents/

The −−delete option ensures that any files or directories that no longer exist on the source are also removed from the destination.

Tagged with:
 

Reset TYPO3 password

If you forget your typo3 password, you can reset it using the mysql command line tool as follows:


mysql> use typo3;
mysql> update be_users set password='bacb98acf97e0b6112b1d1b650b84971' where username = 'admin';

This resets the admin user password to “joh316″.

Tagged with:
 

Date format

Format a date in ruby using the string from time method (strftime).

Format options:
  %a - The abbreviated weekday name (``Sun'')
  %A - The  full  weekday  name (``Sunday'')
  %b - The abbreviated month name (``Jan'')
  %B - The  full  month  name (``January'')
  %c - The preferred local date and time representation
  %d - Day of the month (01..31)
  %H - Hour of the day, 24-hour clock (00..23)
  %I - Hour of the day, 12-hour clock (01..12)
  %j - Day of the year (001..366)
  %m - Month of the year (01..12)
  %M - Minute of the hour (00..59)
  %p - Meridian indicator (``AM''  or  ``PM'')
  %S - Second of the minute (00..60)
  %U - Week  number  of the current year,
          starting with the first Sunday as the first
          day of the first week (00..53)
  %W - Week  number  of the current year,
          starting with the first Monday as the first
          day of the first week (00..53)
  %w - Day of the week (Sunday is 0, 0..6)
  %x - Preferred representation for the date alone, no time
  %X - Preferred representation for the time alone, no date
  %y - Year without a century (00..99)
  %Y - Year with century
  %Z - Time zone name
  %% - Literal ``%'' character
   t = Time.now
   t.strftime("Today is %m/%d/%Y")   #=> "Today is 04/29/2008"
   t.strftime("at %I:%M %p")            #=> "at 10:04 PM"
Tagged with:
 

Ruby on Rails for RHEL 5

Here is the quick and dirty Ruby on Rails setup for Redhat Enterprise Linux v5.0 with MySQL.

(2009-12-04 Update: This does not work with RHEL 5.4. The mysql ruby gem requires ruby 1.8.6 and RHEL 5.4 only ships with ruby 1.8.5)

Using yum install ruby and mysql. The command below does not list all the required packages, but due to dependencies, the additional packages will be installed (or should be – this is all from memory).
(more…)

Tagged with: