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

Learn about dotfiles through others' efforts UNIX
Haven't seen this one before and not really sure how to explain it. Basically, dotfiles.com is a repository of shell config files submitted by users. You know, the ones we all modify - .tcshrc, .cshrc, .bashrc, etc. - to get that "just right" terminal experience.

I am not sure I would willy-nilly download these files and install them unless you really know what's going on with them. There is always a possibility of a little hack being built in, etc. I mention it as a resource for learning - visit the site and peruse some files using the "Preview" button, and maybe you'll end up finding just the hack you were looking for.
  Post a comment  •  Comments (3)  
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[3,176 views] Email Article To a Friend View Printable Version
Create a universal MP3 playlist UNIX
I found this trick out a while back while running a program named Music 0.1.app. It was the first attempt at skinning mpg123 for OS X ... enough history though. Basically by typing in this command:
find ~/Music/* -type f -name '*.mp3' > ~/Music/Playlist.m3u
a playlist is created in your music directory that contains every single music file in your music directory. Play this file via mpg123 by typing:
mpg123 -@ ~/Playlist.m3u
This is a standard MP3 playlist, so basically any MP3 program can read it. Obviously you can alter this command to list other files such as .mov, .jpeg, etc. Thought this would be helpful for some people...

[Editor's note: See previous hints on mpg123 and other uses for the find command.]
  Post a comment  •  Comments (5)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[14,959 views] Email Article To a Friend View Printable Version
Help find new Mersenne primes UNIX
Gaurav Khanna, whose scientific tools page was mentioned in an earlier hint on vectorizing and parallelizing in OS X, has ported two GIMPS clients to OS X. What is GIMPS? The Global Internet Mersenne Prime Search, a distributed computing project to identify new Mersenne primes. What's a Mersenne prime? Head to the project's homepage to find out!

Gaurav has added a number of other scientific and technical programs to the page over the last few months, including a Pascal to C converter. Stop by his page if you're interested in finding high performance computing programs for your OS X box.
read more (1 words)   Post a comment  •  Comments (0)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[2,502 views] Email Article To a Friend View Printable Version
Analyze your webserver logs with The Webalizer UNIX
Last year, we published a hint on installing the webserver analysis program Analog. There are, of course, other analysis programs out there, one of which is The Webalizer. The Webalizer is a super fast and flexible open-source analysis package, and it's used on many sites, large and small. It's been the web analysis tool of choice on macosxhints.com for quite a while now.

Installing The Webalizer on OS X is a snap, thanks to a precompiled OS X version available on their download page. Just download the archive and expand it, then open a terminal and type a couple of commands:
 % sudo cp webalizer /usr/local/bin/webalizer
% sudo chmod 755 /usr/local/bin/webalizer
% sudo cp webalizer.1 /usr/local/share/man/man1/webalizer.1
% rehash
This installs The Webalizer (change the path if you don't wish to have it in /usr/local/bin) and the man page for the prgoram. Typing 'rehash' forces the shell to find the new program. Once that's done, just run the webalizer from a directory of your choice:
 % webalizer /var/log/httpd/access_log
The end result is an index.html file you can open in any web browser showing the usage of your Apache webserver. For more information on configuration options, check the 'man' pages.
  Post a comment  •  Comments (14)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[10,829 views] Email Article To a Friend View Printable Version
Create a local Google search service UNIX
If you have your own webserver running on your OS X machine, then think of adding Google API calls. Implementing it is easy, but you need to install extra Perl or PHP libraries. A simple Google API example script plus helpful links can be found at kung-foo.tv.
  Post a comment  •  Comments (0)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[2,191 views] Email Article To a Friend View Printable Version
A login script to fix sendmail permissions UNIX
I have seen a bunch of different threads on different mailing lists regarding problems with Sendmail on OS X because of permission problems. To make life easier, I created this StartupItem to deal with the problem. This has been tested on 10.1.4. I run postfix instead of Sendmail, so this isn't an issue for me, but in the interest of being helpful, here's a fix.

This startup item fixes the permissions on /, /etc and /etc/mail so that Sendmail (as distributed with 10.1.4 at least) will run. Read the rest of the article for the scripts...

[Editor's note: I had a minor database glitch this morning, and I just noticed that this article was under my by-line. I have now corrected it to reflect the original submitter; my apologies for the incorrect attribution!]
read more (161 words)   Post a comment  •  Comments (11)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[4,737 views] Email Article To a Friend View Printable Version
Send Mail.app email from the command line UNIX
Here's a perl script that will create a new email in Mail.app. I wrote it so I can type "mail email@what.ever" in Terminal, and have it open up a new message in Mail.app (I've named it "mail", and put it into my own ~/bin directory). This will be of interest mainly to unix heads inured to typing "mail" into the command line.

Read the rest of the article for the script...
read more (139 words)   Post a comment  •  Comments (5)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[8,008 views] Email Article To a Friend View Printable Version
Use Eterm as an alternative to Terminal.app UNIX
I don't know if I'm alone with this, but I think that Terminal.app has lots of room for improvement. You don't get syntax highlighting in vim without some trickery, for instance. I used to stick to xterm in OroborOSX. But it's really slow. First I thought it all had to do with XonX, but after having installed Eterm, I see it's much faster, and it has a more accessible scrollbar as well.

For those who haven't heard of Eterm, it's the terminal application of preference with the Enlightenment window manager, popular together with Gnome. It's highly configurable and "themeable" for those who appreciate such things. If you have fink installed, installing Eterm is as simple as:
% sudo apt-get install eterm
[Editor's note: Eterm is a very nice terminal program. I trashed my fink installation tonight on accident, but it only took about 20 minutes to get it all running again, with eterm installed. Wiht lots of unique themes and fast scrolling, it's a nice alternative to the OS X Terminal.app.]
  Post a comment  •  Comments (11)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[7,113 views] Email Article To a Friend View Printable Version
Set terminal title to current directory UNIX
Want to display your hostname and current directory in Terminal.app's title bar? Now you can!
  1. Create a script called chg_dir.sh (/Library/Scripts is a good place) with contents as follows:
    #!/bin/sh
    dir=$1
    if [ ! ${dir} ] ; then
    dir="$HOME"
    fi
    echo -n "^[]0;`uname -n`:${dir}^G"
    NOTE: ^[ represents the escape key, ^G represent control-G. To type these non-printing characters in vi, use ctrl-V and then "escape" and "control-G".

  2. Edit your .cshrc (or equivilant) and add these two lines:
    echo -n "^[]0;`uname -n`:${HOME}^G"
    alias cd "cd !* ; /Library/Scripts/chg_dir.sh !*"
Now when you start a new terminal session, the title is set to "host:/home/dir". When you change dir it becomes host:/current/dir".

[Editor's note: There was another way to accomplish this same result posted in an earlier hint, but this one was unique enough to merit its own mention. I tested this, and it works as described. I added the two lines to my existing "aliases.mine" file, and placed the script in ~/bin. I still personally prefer this hint, which explains how to show the current command in the title bar, but the directory info is also useful.]
  Post a comment  •  Comments (4)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[13,661 views] Email Article To a Friend View Printable Version
Install a local version of the freedb server UNIX
Over on freedb.org, there's an article by 'ruebenschuss' that covers installing the freedb server locally on OS X. freedb is an offshoot of the now-commercial CDDB, which is what many programs use to catalog and recognize inserted CDs.

Why would you want to install a local version of the database? The author writes:
Since OS X is a proper UNIX, it should be fairly easy to run the freedb on it. I've managed to compile the freedb server with only few changes and query it via telnet. It should be possible for any CD rip application to connect to "localhost" as cddb server and get the information there. This would make it possible to rip CDs without a connection to the internet.
The article also links to a separate page which contains the how-to instructions, the database files, and the server source code for installing on OS X.

At this point, installing the files locally will not allow iTunes to recognize CD's without an internet connection, but the article discusses how that may be possible in the near future.
  Post a comment  •  Comments (2)  
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[5,680 views] Email Article To a Friend View Printable Version