Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create a one-step whois lookup script Internet
OS X comes with the 'whois' command, a useful utility for checking domain name registrations and finding domain contacts. It's run from Terminal.app. However, since the advent of all the new ICANN approved registrars for domains, one must run 'whois' twice to actually get some meaningful results if the domain is not registered at Network Solutions. Run whois once to get the whois server that's serving the domain information, and a second time (with the "-h" swtich), to actually query the first referenced whois server.

I've written a little bash script to make this just a little bit easier (and in one step). It's included below in the hopes others may find it useful.
 #!/bin/bash
echo "Getting server..."
export SERVER=`whois $1 | grep -i whois\ server: |
awk '{print $3'}`
echo "Searching server: $SERVER"
whois -h $SERVER $1
[IMPORTAND NOTE: The "export" line must be entered as one line, not two; just replace the line break with a space...]

Copy the above text to your clipboard (Command+C), then fire off Terminal.app to create the script. Start a pico session, as root, and create the script with sudo pico /usr/bin/mywhois. Use Command+V to paste the above text into pico, and save and exit. Now, just make the script executable, by entering sudo chmod +x /usr/bin/mywhois, and you're done!

Now when you run a mywhois macosxhints.com, for example, the first few lines will show:
 Getting server...
Searching server: whois.godaddy.com
The data contained in Go Daddy Software, Inc.'s WHOIS database,
while believed by the company to be reliable, is provided "as is"...
[Editor's note: I tested this an it ran just fine as is in my relatively standard tcsh shell environment.]
  Post a comment  •  Comments (17)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[10,571 views] Email Article To a Friend View Printable Version
A PHP script to show current QTSS song on the web Internet
Here is a script that will display the currently playing track info from QT SS on a web page using php.

This was basically written by vonleigh with help from nosaj56 in the forums - thanks guys!
<?php 

// Define path to playlist.current
// Change to match your playlist name and path
$path = "/path/to/QTSS/playlist.current";

// Read playlist.current into $file
$file = fopen($path, "r");

// Read the contents of $file into $content
$content = fread ($file, filesize($path));

// Separate into parts and put in $info array
$info = explode("/",$content);

// Delete .mp3
$song = substr($info[5], 0, -4);

// Make sure to close after you open
fclose($file);

// Print the information
echo "<br> Track: $song <br>";
echo "<br> Album: $info[4] <br>";
echo "<br> Artist: $info[3] <br>";

?>
You might need to change the permisions of the playlist directory with chmod 777 to get it to work.
  Post a comment  •  Comments (2)  
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[4,384 views] Email Article To a Friend View Printable Version
Wireless net access with Motorola C332 and T-Mobile Internet
I just switched over to T-Mobile Cellular and lo, and behold, there is a USB port on the bottom of my Motorola C332 phone (it's the sorta kidney-bean shaped one with the blue border). The manual said it was for a computer connection and, after some looking around, also a data connection. All I needed was a USB to mini USB (I don't know what else to call it) cable. I then remembered I had one in my Camcorder bag. If you don't have one, they are easily available.

I plugged the USB cable into both computer and cell phone ... and nothing happened. I then went to my Network Preferences and it auto-detected a new Network Port (like Ethernet or Internal Modem) called Motorola Phone (C330). I created a new location called Mobile and put in my dial-up PPP settings (making sure that "Motorola Phone (C330)" was showing by the text "Show:"). Then I went to Modem and saw that there were a whole slew of Motorola modems. After trial and error, the one that worked for me was Motorola iR TimePort (7089).

After saving the configuration, I was able to dial-up through my cell phone and access the internet! Was it fast? No! Was I connected to the internet remotely with no wires except the one connecting my PowerBook to my Cell phone? YES! I thought that was pretty cool. Just a note ... you have to have T-Zones Service to make this work, and there may be charges I am not aware of.
  Post a comment  •  Comments (16)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[10,260 views] Email Article To a Friend View Printable Version
Use Google Mac to restrict search results to Mac only Internet
If you're as big a Google fan as I am, you can go to http://www.google.com/mac and your results will only be Macintosh related. Now there's no need to specify mac or macintosh in the query/input line.

[Editor's note: Google Mac has been listed here on the links page for a while, but I thought it was worth a mention in a hint -- you can eliminate many excess results if you're looking for Mac-specific information by using Google Mac.]
  Post a comment  •  Comments (5)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[5,559 views] Email Article To a Friend View Printable Version
Use a Sanyo 4900 phone as a wireless modem Internet
If you have a Sanyo 4900 phone and would like to use it as a wireless modem, here's how to do it. First, to give credit where credit is due; this document explains how to get things working under Linux. To answer a question on that page, yes, the cable from Sanyo is much cheaper and yes it's the right cable. The phone gets picked up as a standard modem titled "Sanyo USB Phone".

You will also need service. Sprint's latest "vision" plans are pretty well priced, and don't rip you off at all. The only thing that sucks if that the off-peak minutes start at 9 pm, but if you're okay with that, then you can get the phone for $50, and apparently there's a rebate on the phone over at Amazon. I'm going to go look today, but I digress...

[Editor's note: No Sanyo phone here, so this hint is untested...]
read more (266 words)   Post a comment  •  Comments (26)  
  • Currently 5.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[32,208 views] Email Article To a Friend View Printable Version
Accessing an iDisk with Privoxy installed Internet
If you have Privoxy installed, you'll have trouble mounting your iDisk. To get around this, go to the Proxies tab in Network Preferences and enter "mac.com" in the bypass list.

[Editor's note: I haven't tested this myself, and an earlier hint seems to imply that the bypass setting doesn't work properly. Can anyone using .mac and Privoxy verify this hint?]
  Post a comment  •  Comments (4)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[3,368 views] Email Article To a Friend View Printable Version
Access WAP sites with Opera Internet
Ringtones and logos can be downloaded to cell phones via WAP browsers built into the phone. Often times, these files are only available via WAP and not HTTP. However, the current Mac OS X beta version of Opera will access WAP sites and let you download these files to your Mac. With Bluetooth File Transfer or third party software like Ericsson Client, you can then transfer the files from your Mac to your phone. Great way to avoid airtime charges or if your phone plan doesn't include WAP.
  Post a comment  •  Comments (1)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[5,200 views] Email Article To a Friend View Printable Version
Apple releases Sherlock3 development kit Internet
At last! Apple has released a Software Development Kit (SDK) for developing plug-ins for Sherlock 3. What this means (for non-developers) is that developers can now create Sherlock 3 channels. I'll let you know when I have a macosxhints.com channel! Find out more on Apple's Sherlock Developer page.
  Post a comment  •  Comments (4)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[2,705 views] Email Article To a Friend View Printable Version
Mount remote disk images locally through a browser Internet
There was a previous hint about mounting remote disk images locally, but this stopped working with Jaguar. I recently discovered, though, that you can do it directly from your browser. Paste the URL into your address bar, and change 'http' to 'disk' then press return, and the image will mount in the finder. For example, change this:
http://www.headshack.com/software/chartConstructor/chartConstructor.dmg
Into this:
disk://www.headshack.com/software/chartConstructor/chartConstructor.dmg
[Editor's note: Neat trick; I tried using Mozilla and Chimera, and both worked perfectly.]
  Post a comment  •  Comments (1)  
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[9,566 views] Email Article To a Friend View Printable Version
Use custom icons with Apache directory listings Internet
If you are running apache, you can replace the default icons used when a directory is listed with your own. This way you can make your webserver running on OSX look like it is running on OSX. The icons are in /usr/share/httpd/icons/, and I would suggest backing all of these up before you mess with them. you can do this quickly by typing:
sudo cp -r /usr/share/httpd/icons /usr/share/httpd/icons.bak
You can use the Get Info (Command-I in the Finder) command to view the icon for a certian type of file, then copy it and use Photoshop or something to save the icon as a gif. Then replace the default icon file with the one you have just created. Now when list a dirctory you should see your customized icon.

You can also add new types by edditing you httpd.conf file (/etc/httpd/httpd.conf). Add the line:
AddIcon [PathToIcon] [Extensions]
For example, if you want an icon to show up for disk images then add the line:
AddIcon /icons/diskimg.gif .dmg .cdr .smi
I would suggest adding these lines in with all of the others that are already in the httpd.conf file.
  Post a comment  •  Comments (14)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[22,486 views] Email Article To a Friend View Printable Version