Archive Page 2



One year after switching to a Mac…

Published August 17th, 2009 by lagreca

Just like the saying says, 3rd time is a charm.  I tried switching to Mac two times before the final time.  I am now a full fledged mac user, and am quite happy.  Here is a list of things I like and dis-like:

Likes:

  • OS is very stable and smooth and does not slow down between reboots
  • faster reboots, shutdowns, sleep and wake
  • iPhoto is great for managing all of our digital photos
  • iMovie is great for making home movies from all of our video clips
  • terminal with a familiar set of linux commands (ssh, rsync, etc)
  • disk utility for managing disks (partitions, formatting, re-sizing, etc)
  • time machine is GREAT for no brainer backups
  • AdiumX is much better than Gaim or Pidgin
  • preferences are all stored in files instead of a registry
  • spotlight and quicksilver
  • VNC is built into the OS
  • File sharing is easy and make sense in P2P networks
  • switching computers is no longer an all day affair.  Either use migration assistant or restore from a time machine backup.
  • switching hard drives is simply done by using disk utility to copy all files to the new drive.
  • expose is great way to view all your open windows, desktop , or just a particular applications windows.
  • The mac can be on multiple subnets simultaneously with just one NIC (Windows can have multiple IP’s on a NIC, but they have to be on the same subnet).
  • software installs are often times as simple as copying the application to your applications folder
  • playing music from remote itunes libraries is easy (unfortunately, this does NOT mean copying music, ONLY playing it).
  • growl is a great 3rd party notification system

Dis-Likes:

  • inconsistent user interface.  Example:  Sometimes closing a window closes the app.  Other times when closing a window the app remains running.
  • wireless seems slower than on pc’s
  • mac file droppings left all over (solution for network shares:  http://support.apple.com/kb/HT1629) (solution for local drives: http://www.zeroonetwenty.com/blueharvest/)
  • not able to cut and paste files to move them around the file system, must have two windows open and drag files/folders between them.
  • pressing enter when something is selected changes the name, it does not open it
  • no GUI application like putty to manage ssh sessions
  • no notepad++ like application for editing text files
  • no Chrome browser for Mac yet…
  • when looking for wireless networks to connect to, Leopard does NOT display signal strength, just network name (solved in snow leopard).

Using Google Reader “Send To” with Gmail

Published August 14th, 2009 by lagreca

Here is how to use the new “Send To” feature, in google reader, to send items directly to a new Gmail email.

To set this up, go to Google Reader and open Settings. Select the “Send To” tab and click on the “Create a custom link” button.  Fill in with this information:

  • Name:  Email
  • URL:  mailto:?subject=${title}&body=${title}%0A%0A${url}
  • Icon URL:  http://mail.google.com/mail/images/favicon.ico

Example:

gr_sendto_gmail_example

Using Google Reader “Send To” with WordPress

Published August 14th, 2009 by lagreca

Here is how to use the new “Send To” feature, in google reader, to send items directly to a new WordPress post.  (make sure to replace with your own domain name!)

To set this up, go to Google Reader and open Settings. Select the “Send To” tab and click on the “Create a custom link” button.  Fill in with this information:

  • Name:  Whatever name you want the action called in google reader
  • URL:  http://www.yourdomain.com/wp-admin/press-this.php?u=${url}&t=${title}&s=${source}&v=2
  • Icon URL:  http://s.wordpress.org/favicon.ico?3

Example:

gr_sendto_example

via Using Google Reader “Send To” with WordPress | thingelstad.com.

Mac Screen Capture Shortcuts

Published August 14th, 2009 by lagreca

Screen Capture Shortcuts

  • Command-Shift-3:  screen capture of your entire screen, save to your desktop
  • Command-Shift-4:  crosshair cursor so you can choose which area of the screen you want to capture, save to your desktop
  • Adding Control to either of these commands copies the capture into your Clipboard memory, so you can paste it where you want.

via Apple – Pro – Tips – The Secret Screen Capture Shortcut.

How to install and use sshfs using MacFUSE

Published August 13th, 2009 by lagreca

I wanted to create a secure drop box to my website and decided to try sshfs.

I had MacFuse already installed from using NTFS-3G.

  • Download and install sshfs.
  • Double click the gz file you downloaded to extract and rename it to sshfs.
  • Move the sshfs application to /usr/local/bin/
    • Go to Finder, Go, Go to folder…
    • type in:  /usr/local/bin/
    • Drag the sshfs app to the folder
    • Finder will ask you to authenticate, so type in your password
  • Now you need to change the permissions on the sshfs file so it is executable.
    • Launch Terminal
    • cd /usr/local/bin/
    • ls -al to see files and permissions
    • To change the permissions:  chmod 755 sshfs
    • To change the owner and group:  sudo chown root:wheel sshfs

Now you can use sshfs to mount your remote shares.  I created a script to initiate the mount, but obviously this can be used at the command line. For usage options type:  sshfs -h

Here is my script:

umount /Volumes/Domain.com

rmdir /Volumes/Domain.com

mkdir /Volumes/Domain.com

sshfs username@domain.com:path/uploads/ /Volumes/Domain.com/ -o auto_cache -o local -o volname=Domain.com

Here is what happens:

  • unmount anything that may exist in /Volume/Domain.com
  • delete any Domain.com folder that exists in /Volumes
  • create /Volumes/Domain.com to mount the remote file system into
  • finally mount the remote file system

Caveat:  sshfs does NOT do file locking, therefor it would NOT be good to use in a multi-user environment.  You can, but you will more than likely run into problems.

Linux shell script to monitor disk space

Published August 10th, 2009 by lagreca

Problem:  Hard drives can fill up, and when they do, no good can come of it.  Wouldn’t you like to be notified before impending disaster so you can correct the situation?

Solution:  Here is a simple script that I put in /etc/cron.hourly (would probably be better in cron.daily, but I’m overly paranoid)

#!/bin/sh
# set -x
# Shell script to monitor or watch the disk space
# It will send an email to $ADMIN, if the (free available) percentage of space is >= 90%.
# ————————————————————————-
# Set admin email so that you can get email.
ADMIN=”administrator@yourdomain.com”
# set alert level 90% is default
ALERT=80
# Exclude list of unwanted monitoring, if several partions then use “|” to separate the partitions.
# An example: EXCLUDE_LIST=”/dev/hdd1|/dev/hdc5″
EXCLUDE_LIST=”/boot”
#
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
function main_prog() {
while read output;
do
#echo $output
usep=$(echo $output | awk ‘{ print $1}’ | cut -d’%’ -f1)
partition=$(echo $output | awk ‘{print $2}’)
if [ $usep -ge $ALERT ] ; then
echo “Running out of space \”$partition ($usep%)\” on server $(hostname), $(date)” | \
mail -s “Alert: Almost out of disk space $usep%” $ADMIN
fi
done
}

if [ "$EXCLUDE_LIST" != "" ] ; then
df -H | grep -vE “^Filesystem|tmpfs|cdrom|${EXCLUDE_LIST}” | awk ‘{print $5 ” ” $6}’ | main_prog
else
df -H | grep -vE “^Filesystem|tmpfs|cdrom” | awk ‘{print $5 ” ” $6}’ | main_prog
fi

Download:  diskalert.sh

Credit:  http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html

Google talk in a pop-out window!

Published April 8th, 2009 by admin

Google used to have a link at talk.google.com for a pop-out chat window, owever it is no longer there.  But you can still chat via the web app by simply dragging Google Talk to your Bookmarks Bar for 1-click access to a floating version.

Don’t forget to install the audio and video chat plugin http://mail.google.com/videochat

NTFS read AND WRITE on a Mac

Published March 26th, 2009 by lagreca

Requirements:  Mac OS X 10.4/10.5, running on an Intel or PowerPC computer

Process:  While the process requires two separate installs, its VERY simple.

Install:

It now JUST WORKS.  However if you NEED to see something, you can go to the NTFS-3G system preference.

How to protect yourself from the Conficker virus and others…

Published March 26th, 2009 by lagreca

The latest Conficker virus variant will begin checking for a payload to download on April 1, 2009.  Here are a few steps you can take to make sure your computer is safe against this and other viruses:

Symptoms of infection:

  • Account lockout policies being reset automatically.
  • Certain Microsoft Windows services such as Automatic Updates, Background Intelligent Transfer Service (BITS), Windows Defender and Error Reporting Services disabled.
  • Domain controllers responding slowly to client requests.
  • Congestion on local area networks.
  • Web sites related to antivirus software becoming inaccessible.

Quick tests to see if you are infected:

Multiple network adapters on OS X gotcha!

Published March 19th, 2009 by lagreca

A few days ago I was touting one big benefit of OS X was that you could be on multiple IP subnets simultaneously.  Today I’m writing to let you know that this still works, but beware of the dumb mac users who try this…

Today I was trying to VPN into one of my clients networks.  The PPTP VPN connection would connect, but no traffic was sent.  I glanced in the Console in OS X and found this:

3/19/09 3/19/09, 9:58:07 PM pppd[1555] route_interface: write routing socket failed, File exists

After googling “route_interface: write routing socket failed, File exists” a bit, it dawned on me, that the second Ethernet interface I added the other day, was on the same subnet as my clients remote network.  So the PPTP VPN wouldn’t pass any traffic.  Once I disabled (or I could have changed IP addresses) the second Ethernet interface, the PPTP VPN started working perfectly again!