SVN externals 1
Here is how to set a directory to fetch as an svn:externals directory. I keep forgetting this. Now you can remember it too.
#make sure your editor variable is set, find the editor
# or which vi or whatever
which emacs
#no spaces in EDITOR="
export EDITOR="/usr/bin/emacs"
cd THE-DIRECTORY-YOU-WANT-EXTERNAL-TO-BE-IN
#propset the svn externals on the current directory, this pops up the editor
svn propedit svn:externals .
# in emacs --- in emacs -- in emacs one directory per line.
apache-ant http://svn.repository.my/apache-ant/trunk/
# you saved the file, back in the shell
#download the repo as the new directory directory-name, in this case apache-ant
svn update
DONE
osx command line to clipboard 2
pbcopy and pbpaste are command line tools that take standard in and put on the system clipboard. Useful when noodling around with config files.
SSH as a VPN
I found this example on using ssh as a vpn.
You can use SSH to set up a socks proxy on a remote Mac where you have an account.
First setup the remote Mac:
- Make sure you set up a user account on the remote Mac, and that all user accounts have a strong password
- turn on “remote access”.
- If the remote Mac is behind a router, you will also need to give it a manual internal IP address and to set up port forwarding on your router to forward port 22 to that manual internal IP address.
- You will need to leave the remote Mac running (turn off sleep and set it to restart if there is a power failure).
- You will need to know the external address of the remote Mac, so note it, and if your isp regularly changes it, you will need to purchase a service that regularly informs you of the remote Macs current IP address.
Once set up as above, you start up the proxy from your local Mac using the terminal application and the command:
ssh username@xx.xx.xx.xx -D 2001
where username is your short username and xx.xx.xx.xx is the remote Macs external ip address. You will need to enter your password.
Now set Firefox on your local Mac to use a socks 4 proxy on 127.0.0.1 (localhost) port 2001, and you can use www.showmyip.com to verify your proxying through the remote Mac.
Now your web traffic will be proxied and encrypted between your local and remote Mac. This should also work with other application that allows you to set a socks 4 proxy.
There is some risk in having remote access setup on a computer which is constantly on the internet. Strong passwords can help deter hackers, but for further security, there are ways to change the port that remote access uses, or to disable passwords and use only encryption keys for access. Others in this forum can give you the details.
OSX Webdav SVN
Osx can mount a subversion repository over webdav. The repository appears as a network drive. Any changes to files in the repository are autocommited. Cool, except..
The svn repository is filled with one .DS_store file for each directory. Annoying
type this in a terminal window and restart.
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
No more problem.
os X command line shortcuts
Launch finder from command line
So I just found out if you type
open .
from any directory in the command line it will open that directory in the finder. This is pretty helpful