I often take screenshots and upload them for my friends to see -- especially while working on web projects etc. So I created an Automator workflow that does this automagically!
First the workflow snaps the whole screen and saves it to the desktop. Then a bash script is run wich uses ftp to upload the image to the webserver. It then takes the URL of the image and copies it to the clipboard. Lastly it notifies you of the upload via Growl. It has no error handling or anything. This is my first workflow and bash script ever, but it works for me.
In Automator, create the following steps in a new blank workflow:
Utilities » Take Screenshot. Use these settings:
Type: Full Screen, or whatever you prefer.
Select Main Monitor Only and/or Timed as you desire.
Set the Save To pop-up menu so that it saves to a file named tmpScreen.png on your Desktop.
Utilities » Run Shell Script. Set Shell to /bin/bash and Pass Input to to stdin. Enter the following code, noting the lines you need to edit:
# Author: Simon Ljungberg @ www.nimnim.se
# Edit the 5 lines below to fit your configuration
# URL will be copied to your clipboard!
# If you change this you need to change the rm-line too.
# For some reason (I'm new at this) I couldn't get the file
# to disappear when using the variable...
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
put $LOCALFILE $REMOTEFILE
echo $URL | pbcopy
If you have Growl installed, add Utilities » Show Growl Notification. Give it a Title ("Done!") and Description ("Your screenshot has been uploaded") so you'll see a message after the upload is completed.
I want to run Apache with virtual sites located outside my user's Sites folder. Instead, I wanted to be able to keep them anywhere within my user's Documents folder. This is because sibling directories of the desired document root may be assets, documentation, various source code, and/or any content related to the project. I do not wish to keep these files in a web-accessible folders, but I do want to keep these directories in the same parent directory.
I scoured the net and it seems that I may be the only one who wishes to do this. Just in case I'm not, though the following is how I figured it out.
The following solution worked for me in OS X 10.5.6 running Apache 2.2.9. Note that if you don't understand any of the following steps, please use caution and Google before proceeding
Set up your virtual host with ~/Documents/any/sub/folder/ as the document root. (see Apache manual)
Add yourself to the www group: sudo dscl localhost append /Local/Default/Groups/www GroupMembership _username_ -- replace _username_ with your user's short username.
chgrp www ~/Documents
chmod 750 ~/Documents
I'm not entirely comfortable with enabling +rx access to the www group, and therefore the httpd process on my home directory. However, this is a local development machine and I'm stoked to at least maintain my usual linux directory structure and have my vhosts working.
Please, if anyone knows of a better way to allow Apache to use any folder as the document root for a virtual host -- without enabling read/execute access to www group on one's home directory -- do inform.
For some time, I googled and hunted for a solution that would allow me to change the subnet that Internet Sharing (on the Sharing System Preferences panel) uses when sharing onto an Ethernet network -- the default being 192.168.2.0. In my case, this also happens to be a subnet used by my corporate VPN, which is not too convenient.
The solution for Leopard turned out to be extremely straightforward, and can be found in the unix help file for InternetSharing -- just type man InternetSharing to read it in Terminal:
Copy the plist file /Library » Preferences » SystemConfiguration » com.apple.nat.plist to your home directory, eg: sudo cp /Library/Preferences/SystemConfiguration/com.apple.nat.plist ~.
Use Xcode's Property List Editor (or any other property list editor) to edit the file in your home directory.
Add a new key (child) to the NAT dict. Call it SharingNetworkNumberStart. The type should be String, and the value is the IP network you want to use (eg 10.168.2.0). As an example, here's what my edited file looks like:
WebMon (Leopard, Tiger) to set up a WebDAV server to sync iCal and Outlook calendars between home and work.
Read the blog entry for more detail on each of these solutions.
[robg adds: While the above guide is a good 'getting started' primer on setting up a home-based web server, note that many ISPs won't allow you to run a web server on a home connection plan. Even if it's not prohibited, many home connections lack the upload bandwidth to effectively serve pages to more than a handful of users at one time.
So as technically cool as it is to run a server from your own home (and I keep one running, but restrict access to my own use via password protection), there are many free and low cost hosting companies that offer better connectivity along with all (and usually more) of the above features. I host our family's site and my personal blog using 1and1.com, for instance, but there are literally thousands of companies to pick from. Sites such as Web Hosting Geeks and Upper Host list some of the best-rated providers, and I'm sure the readers here have lots of suggestions for those looking to start hosting a site.]
I recently upgraded from Tiger 10.4.11 to Leopard 10.5.6. Everything seemed fine, except for a drastic slowdown in my dial-up internet access via the internal modem. Oddly Safari and Firefox ran fine, but my Mail and FTP/Telnet were crawling under the new OS.
The solution that worked for me was to uncheck the "Use TCP header compression" setting, which can be found here: System Preferences » Network » Internal Modem » Advanced button (lower right) » PPP tab. On that tab, set the Settings pop-up menu to Configuration, and uncheck the "Use TCP header compression" box. Then click the OK button in the lower right, followed by the Apply button (in the lower right), and you're done.
If your modem is connected, disconnect and reconnect to implement the change.
I commonly use IRC, and always while using my MacBook on a wireless connection. This can be an annoyance, as some IRC servers make you wait a period of time before they will allow you to connect (sometimes over 30 seconds).
After scouring the internet and many false attempts, I found IdentD, a free neat little System Preference that handles what I need to nicely. (There's more info on the program on its MacUpdate page.)
I installed this on one of my G4 towers that was permanently connected to my network with Ethernet cables -- you cannot use this application on the computer that is using a wireless connection. I then set up the app via its preferences panel in System Preferences to return a custom string containing the IRC username (Your Shorthand name) that I was use on my MacBook.
After this, I simply configuring my router to forward port 113 (TCP) to my G4 tower, and told the firewall on my G4 to allow port 113. This resolved my connection problems to IRC servers.
In Google Calendar, you can enter the event name and start time together in the one-click shortcut.
Start by clicking the calendar day or hour for a pop-up bubble. Type the start time (7p or 700p any place in the event name. It's even suggested by the example, 7pm Dinner at Pancho's.) Then click on Create Event" or press Enter. The start time will precede the event name. Note that 7p-8p won't convert.
This feature can't be used on an existing event -- when you edit an existing event, typing 7p in the subject line won't convert. You must uncheck All Day and choose the start time from the pulldown menu, or highlight the time box and enter at least 7p or 700p (or at least 7 for AM).
Although I haven't been blessed with children yet, I was helping my neighbor the other day who has a bundle of them. She wanted to set up Parental Controls, which worked great, except as soon as the internet filter was turned on, Gmail broke.
The short explanation is that the filtering also filters secure communications (i.e., https), but it's buggy in the current version. I couldn't find any fix, but there's a pretty easy workaround: just add any secure websites you want to access to the "Always Allow" list (under Customize). For example, to get GMail to work, just add "google.com" to the Always Allow list.
The filtering still works pretty well, considering most children probably aren't going to many different secure websites.
If you're using Google's Notifier in your menu bar to check your Gmail, you might have noticed that there is no longer an option to change the check interval (or maybe I'm crazy, but I swore it was there before). I think it is currently set to 10 minutes, but I like it to update more often, especially if I've already gone through the mail that is new.
You can adjust the interval by clicking on the mail icon and then holding down the Command and Option keys while clicking on Preferences. This will pop open a box for a key/value pair. Use AutocheckInterval as the key (case-sensitive) and then set the interval (in minutes) for it to check as the value.