November 2009 Archives

Unmounting Disk via CLI on Mac

| 0 Comments
hdiutil unmount /dev/disk1s1

Modifying plist files on Mac

| 0 Comments
plutil -convert xml1 com.FiLE.plist
plutil -convert binary1 com.FILE.plist

Attaching Solaris Container/Zone

| 0 Comments
Attaching Solaris Container/Zone
zonecfg -z HOST create -a /container/HOST
zoneadm -z HOST attach -F
zoneadm -z HOST boot

Linksys WRT54G Faint Power LED Light

| 0 Comments

Symptoms:
- Router is pingable at 192.168.1.1 for about 5 seconds
- Power LED Light is very faint

Fix:
- Transfer firmware to the router

tftp 192.168.1.1
binary
trace
put dd-wrt.v24_micro_generic.bin

Safari Resources (from http://www.jydesign.com/safari)

Tools for Safari: Full Screen / Maximize Window, Resize Window, Email link, Print link, Open a New Window "button" for Safari, and more.

Full Screen: How can you make your Safari Browser window quickly expand to fill your full screen? Easy, just drag and drop the link below to your bookmarks bar OR bookmarks folder. Then click on it and the simple JavaScript will expand your browser to fill all available screen real estate. Drag this link to your bookmarks bar/folder* (feel free to edit the name of the bookmark):

<empty> Full Screen

Resize Browser Window: Automatically resize your browser window to various standard screen resolutions in order to see how pages will appear (similar to many Firefox plugins). Drag these link to your bookmarks bar or put them in a 'browser sizes' folder:

<empty> 640x480
<empty> 800x600
<empty> 1024x768
<empty> 1280×1024
<empty> 1600×1200

Print "Button": Want a mouse-happy way to print the page you are looking at?
Drag this link to your bookmarks bar/folder (feel free to edit the name of the bookmark):

<empty> Print

GmailThis!: "is an easy way to make a Gmail email without visiting mail.google.com. Once you add the GmailThis! link to your browser's toolbar, emailing will be a snap. Or rather, a click. Clicking GmailThis! creates a mini-interface to Gmail pre populated with a link to the web page you are visiting, as well as any text you have highlighted on that page. Add additional text if you wish and then email or save as draft from within GmailThis!" (Source: thanks to "From the Hall" blog for this cool link code):

<empty> GmailThis!

digg this: "universal JavaScript Bookmarklet, which will automatically submit the URL of the page your browser is currently on, to Digg" (Source: thanks to "Skatter Tech" for this cool link code):

<empty> digg this

New Window "Button": Want a mouse-happy way to open a new browser window?
Drag this link to your bookmarks bar/folder (feel free to edit the name of the bookmark):

<empty> New Window

Mail to / Email Page "Button": This is a simple way to email a link to a friend and it even places the title of the current page into the subject field.*
NOTE: I've had this one up for a while, it's not really necessary now that Safari has two different mailing options available via the File menu.
Drag this link to your bookmarks bar/folder (feel free to edit the name of the bookmark):

<empty> Mail

Minimal Postfix Configuration for Relay

| 0 Comments
Update the main.cf to include the minimum to point the host to a specific relayhost.
myhostname = something.SOMEDOMAIN.com
relayhost = RELAYHOST - FQDN.

Code Patch

| 0 Comments
diff code.pl new-code.pl > code.patch
patch code.pl < code.patch

NetApp SnapMirror for Data Migration

| 0 Comments
Data migration from filer to filer using SnapMirror.
## On source-filer
wrfile -a /etc/snapmirror.allow "destination-filer"

## On destination-filer
wrfile -a /etc/snapmirror.allow "source-filer"
vol create DESTINATION_VOLUME aggr0 100g
vol restrict DESTINATION_VOLUME
snapmirror initialize -S source-filer:SOURCE_VOLUME DESTINATION_VOLUME
snapmirror status -l
snap delete DESTINATION_VOLUME 

Nintendo Wii Remote Jacket Accessory Offer

| 0 Comments

Nintendo is now including the Wii Remote Jacket for the Wii Remotes in all new hardware being shipped. For Wii owners who purchased their systems prior to this addition, we are offering to send free Wii Remote Jackets for their existing Wii Remotes.

http://www.nintendo.com/consumer/jacket/jacketrequest.jsp

Disable DNS Lookups on Cisco IOS

| 0 Comments

no ip domain-lookup

Resetting PRAM on Mac

| 0 Comments

From http://support.apple.com/kb/HT1379

- This has been known to clear up Macbook Pro Airport WiFi issues.

---

Resetting PRAM and NVRAM

  1. Shut down the computer.
  2. Locate the following keys on the keyboard: Command, Option, P, and R. You will need to hold these keys down simultaneously in step 4.
  3. Turn on the computer.
  4. Press and hold the Command-Option-P-R keys. You must press this key combination before the gray screen appears.
  5. Hold the keys down until the computer restarts and you hear the startup sound for the second time.
  6. Release the keys.

Your computer's PRAM and the NVRAM are reset to the default values. The clock settings may be reset to a default date on some models.

Synology MacOS X Client NFS Mount

| 0 Comments

To mount the Synology NFS export from MacOS X. Use the following options on from the command line:

mount_nfs -P /volume1/

        

Enabling Spotlight on the Mac

| 0 Comments
cd /System/Library/LaunchDaemons
sudo launchctl load -w com.apple.metadata.mds.plist
sudo mdutil -E /

Removing .DS_Store from Network Drives

| 0 Comments

Removing the .DS_Store files already created on your network drive. In the example below, specifically only list the smbfs based mount points.

#!/bin/bash

FS=smbfs

for mountpoint in `mount | grep ${FS} | awk '{print $3}'`
do
for mp_file in `find ${mountpoint} -name .DS_Store -fstype ${FS} -exec ls {} \;`
        do
        ls -lh "${mp_file}"
        rm -fv "${mp_file}"
        done
done

Disable .DS_Store on Network Drives

| 0 Comments
From http://support.apple.com/kb/HT1629
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
---

Summary

This is an advanced article that contains information about preventing .DS_Store file creation over network connections.

Products Affected

Mac OS X Server 10.4, Mac OS X 10.4, Mac OS X Server 10.5, Mac OS X 10.5

To configure a Mac OS X user account so that .DS_Store files are not created when interacting with a remote file server using the Finder, follow the steps below:

Note: This will affect the user's interactions with SMB/CIFS, AFP, NFS, and WebDAV servers.

  1. Open Terminal.
  2. Execute this command:
    defaults write com.apple.desktopservices DSDontWriteNetworkStores true
    
  3. Either restart the computer or log out and back in to the user account.

If you want to prevent .DS_Store file creation for other users on the same computer, log in to each user account and perform the steps above—or distribute a copy of the newly modified com.apple.desktopservices.plist file to the ~/Library/Preferences folder of other user accounts.

Additional Information

These steps do not prevent the Finder from creating .DS_Store files on the local volume, and these steps do not prevent previously existing .DS_Store files from being copied to the remote file server.

Disabling the creation of .DS_Store files on remote file servers can cause unexpected behavior in the Finder (click here for one example).


NYU LDAP

| 0 Comments
Server: ldap.nyu.edu
Search Base: o=New York University, st=New York, c=US
Port: 389 
Scope: Subtree
        

Creating Sized Files

| 0 Comments
mkfile 100m 100m

Sun Directory Server Tuning Indexing Replication

| 0 Comments

http://docs.sun.com/source/816-6698-10/indexing.html

http://docs.sun.com/source/816-6697-10/indexing.html

http://docs.sun.com/source/816-6698-10/replicat.html

VNC Startup GNOME Desktop

| 0 Comments
Modify the $HOME/.vnc/xstartup file to include gnome-session.
#!/bin/sh

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session