Sublime Text is quite the fancy editor and a definite step up from TextMate, to mirror the same launch from command-line that TextMate gives you just do this from the command-line:
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Making sure “/usr/local/bin” is in your .bash_profile path
Once in place you should be able to run Sublime from any directory like TextMate,
cd myproject
subl .
Voila,
Let’s begin,
svnadmin create ./svn_notes p. …creates a subversion repository called svn_notes, and the directory svn_notes within your current location
svn import -m “initial” ./notes file:///users/joe/svn_notes p. …imports all files & directories recursively from the notes directory and adds them into your svn_notes repository and adds the message ‘inital’ to the repository log
scp -r ./svn_notes joe@joe.strongspace.com:/home/joe/svn_notes p. …transmits the contents of the svn_notes repository to your strongspace remote store inside the svn_notes directory (create this directory first on your strongspace store), replace ‘joe’ with your username; it will prompt you for your password, but only once.
now go into your notes directory and delete it’s contents, you’ll replace it with a checked-out working copy version, that you’ll check back into your repository every time you make a significant change.
svn co file:///users/joe/svn_notes ./notes p. …checks out a working copy of the contents of the svn_notes directory into the notes directory p. …co = check out
svn commit -m “beta release” ./notes p. …commits changes in the notes directory back into it’s relevant repository
p. …afterwards, just run this to re-upload repository changes back into your strongspace store scp -r ./svn_notes joe@joe.strongspace.com:/home/joe/svn_notes
You can alter the above line to point to a domain account, rather than strongspace, just change the joe.strongspace.com to your domain address and the :/home…. to where you want.
Also remember that when you create new files or directories they won’t automatically be put under version control with your current working copy, to do this run…
svn add [dir] p. …to add a directory (or file) into the repository the next time you run ‘svn commit’.
All the best, drop me a line if you run in to trouble,
TAR is a linux command that makes it easy to wrap up entire files & directories and put them into one file that can be moved to another location. Basically it creates a tape archive (TARBALL) of your files, allowing you to extract them later on and even compress their contents via BZIP; plus it’s really fast!
tar -cvvf backup.tar work
…creates a tar file named work.tar which contains everything in work directory and recursively everything beyond
tar -cjvf backup.tbz work
…adding -j enables tar to compress files & directories with bzip, backing up everything in the work directory and everything beyond. note the different extension used -> .tbz denoting it’s a compressed archive
tar -xvvf backup.tar
…extracts / untar’s everything from the work.tar tarball inside the directory your in
if bzipped, extract with…
tar -xjvf backup.tgz
or gzipped, extract with…
tar -xcvf backup.tar.gz
GZip is essentially a free version of winzip without the you-gotta-pay-for-it stamp. Now used on it’s own it works on single files turning them into gzipped .gz files, with TAR and it allows you to gzip tons of files (see examples above).
to gzip a file do…
gzip myfile.txt
…this gzips it to myfile.gz
to extract the gzipped file do…
gunzip myfile.gz
tar -zcvf backup.tgz .
tar -xzvf backup.tgz
The following is a short guide on using the Linux VI editor (aka VIM) and a few helpful Linux console commands you may need…
h4. VI Editor
this is an inline text editor which is used within your terminal window to create & edit text files on your system, usually used remotely to setup servers it’s not that hard to get a handle round,
vi filename.txt p. …this will open the VI editor and create a textfile called filename.txt. VI will initally open in INSERT mode so you can just start by adding text to your file like any other editor.
p. …to switch to COMMAND mode, hit the ESC key, the status-bar on the bottom will change to reflect this, now to quit and save your file type :wq and hit enter.
p. …to switch to INSERT mode, press shift + i
p. …if you don’t want to save the file & just quit, type :q! and hit enter.
The VIM editor is a really powerful tool and I’d recommend you to read this guide to get you up to speed if you want to do more advanced things, but this should be good enough to get you going.
h4. Linux Commands
In the terminal window, you can do the following to access & navigate your Linux system:
CD .. p. …this moves you down one directory from where you are
CD mydir p. …moves you to the mydir directory
MKDIR foo p. …creates the directory foo
RM -fr foo p. …deletes the directory foo and any other files & directories within it
MV [from] [to] p. …moves a file or directory from one location to another
PASSWD p. …change current password
Enjoy, will update later,