Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
Showing 21-23 of 23 total

Stop bell/beep in bash

setterm -blength 0


Sets the bell length to zero for all applications

Get packet information on OS X

ipconfig getpacket en0


According to the manual page for ipconfig, this command appears to be unique to Mac OS X.

The command will display a bunch of useful info, including:

server_identifier (ip): That's your DHCP server's IP address.
yiaddr: Your machine's IP address.
chaddr: Your machine's MAC address.
domain_name_server: Your domain name server(s).

Find and change a users uid

Most useful for providing a consistent uid on machines accessing an NFS mount:

$ sudo find . -xdev -user <old-uid> -print -exec chown <new-uid> {} \;
« Newer Snippets
Older Snippets »
Showing 21-23 of 23 total