Monday, March 29, 2010

Better than Time Machine for Mac?

Time Machine is a great tool to backup data from your mac. For those of you who are not aware though, there are some alternatives to Time Machine. Using rsync, you can create a simple script that takes your music, pictures etc. and copies it to any drive of your choosing. You could have the script copy your files to multiple drives, instead of just one.

Open up a text editor and create the following script (replacing the paths with your computer's paths)
-----------------------------
#!/bin/bash

rsync -a --progress ~/Documents/ /Volumes/BackUpUSBDrive/Documents
rsync -a --progress ~/Music/ /Volumes/BackupUSBDrive/Music
rsync -a --progress ~/Pictures/ /Volumes/BackupUSBDrive/Pictures
rsync -a --progress ~/Movies/ /Volumes/BackupUSBDrive/Movies
------------------------------

save the file as Backup.bash and then right click on the file and change the file to always open with Terminal. This will allow you to simply click on the file and it will execute your backup script.

NOTE: If you have Parallels installed and you do not want to backup all the virtual hard drives to your USB Backup drive, you can use the --exclude command

For example: rsync -a --progress --exclude Parallels/ ~/Documents/ /Volumes/BackUpUSBDrive/Documents

It is also very important that you have the slash at the end of the "Source" path and that you do not have a slash after the "Destination" path.

Sunday, March 21, 2010

Turbo.264 HD - Applescript/Automator Workflow

http://www.elgato.com/elgato/int/mainmenu/products/Accessories/Turbo264HD/product1.en.html

If you have some cash to spare, i would recommend getting the Turbo.264 HD from Elgato. If you are like me you are always taking your videos and having to wait hours to convert them so that they can play on your iphone or droid. Well with this little usb dongle, you can convert video with lightning speeds. Below is a script that can let you automatically convert files dropped into a folder, making the process even easier.

on adding folder items to this_folder after receiving added_items
tell application "Turbo.264 HD"
set items_added to get the (count of added_items) + 1
set i to 1
repeat until i = items_added
add file(item i of added_items) exporting as iPhone
set i to i+1
end repeat
encode
end tell
end adding folder items to

Once you create this applescript all you have to do is add it as a "Folder Action" on the particular folder you are wanting to use it for. In snow leopard you can just right click and select "Folder Actions Setup"

Grails - Is it enterprise ready?

Grails by Spring is an awesome Web Framework that allows developers to quickly create web based applications. Grails can run on a Java Virtual Machine, thus making it very flexible to implement. http://www.grails.org

My question to the readers is, do you think Grails is enterprise ready? I personally think so and the business i am currently working for has adopted it as our standard for the moment. We develop our Grails applications using the Netbeans 6.8 IDE. When it comes to deployment we are currently running these grails applications on Websphere Application Server 6.1.

I am interested in hearing some of your configurations and what steps you took to make Grails enterprise ready?

We have also implemented Hudson, which allows us to perform continuous integration with our Grails Applications. Hudson builds our applications from SVN on a nightly basis and then can automatically run unit tests and deploy to any application server of our choosing.

Netgear STORA restrict access to outside internet

http://www.netgear.com/stora

The Stora is a NAS (Network Attached Storage) that lets you easily store and share your media. It comes with 1 TB of Storage and allows for the insertion of another 1 tb so that you can use RAID and mirror your drive, in case of drive failure. I recently purchased this drive and I have so far found it to be a great drive. The only feature that i did not like, was the fact that in order to get it to setup you need an active connection to the internet. What STORA does is register you with mystora.com. This lets you access your drive and files from anywhere. For those of you that do not feel quite comfortable having an open connection to your network, you may not like this feature. If you have a Linksys Router, it can be quite easy to disable this service and continue to enjoy your drive.

Navigate to your Linksys Router setup page. Then go to the "Access Restrictions" tab. From here you can easily setup a restriction that does not allow "internet connection" for a specified ip address. For this to work you will need to make sure that your STORA drive is set up with a static IP.

Once you do this, the drive will only be available on your local network.

Configuring Apache to restrict access from specific IP addresses

* Directions for Apache2 on Mac OS x

If you are hosting Web DAV server or Website using Apache, you might want to do the following if you need to restrict access to only certain ip addresses.

Open a "Terminal" window and navigate to /etc/apache2/httpd.conf

Open this configuration file with your favorite editor (vi, pico) and navigate to the section that lists out the directory your webserver is running under.

.
.
#Controls who can get access to your server
Order allow, deny
#Allow from all
Allow from 192.168.1
Allow from 127
Allow from 208.45.66


You will want to comment out the "Allow from all" line and add the lines below that, replacing the ip's with the ip addresses you wish to gain access.  For example if you type 192.168.1 you are saying to allow any ip address from 192.168.1, for example an ip adress that is on your local network that is 192.168.1.103  or 192.168.1.130.

Hopefully this helps.