May 2012

Deploy data files only to new website with rsync [solved]

I wanted to copy everything from my git repo to production except images and media. This tutorial helped me out. This command will copy all js, php, html, and css files and directory structure without copying images or other media:

rsync -av --include='*/' --include='*.php' --include='*.html' --include='*.js' --include='*.css' --exclude='*' source/ destination/

This will work in linux, unix, or os x.

Mount servers and other OS X drives with SSHFS in Lion [Solved]

I tried following the instructions on this blog but it didn’t work (I got a kernel extension error):

http://blog.philippklaus.de/2011/07/sshfs-on-mac-os-x-10-6-8-with-fuse4x/
So instead I ran these two packages:
http://osxfuse.github.com/
https://github.com/osxfuse/osxfuse/wiki/SSHFS
I ran their .pkg files and now I can run commands like this:
mkdir remoteserver/
sshfs jordan@[My IP or Domain]:/ remoteserver/
And it mounts in Finder like a regular directory. I can right click and eject the folder from within the finder. Neat!