My Terminal Cheat Sheet

Copy to remote: scp mylocal.file [email protected]:/home/jordan/mylocal.file
Copy from remote: scp [email protected]:/home/remote.file remote.file

Postgres dump:

pg_dump myDBname > myDumpFile.dmp

Postgres restore:

psql myDbname < myDumpFile.dmp

SVN Life Cycle
Add project to svn:

svn import project http://host_name/svn_dir/repository_name/project -m “First Import”

example:

svn import pricespy svn://wetware.co.nz/subversion/pricespy -m “Inital Import”

Add files to svn:

svn add file1 file2 file3

Smarter add (add only those files not added):

svn st | grep ^? | grep -v \.log | cut -b7- | xargs svn add

That works on Mac OSX and Ubuntu.  You might need to change the -b7- to correctly cut the svn st output.  It will add all those lines from svn st that include a ?.  It will skip andthing with .log.  You can add more pipes into grep to remove more file types.

Commit files to svn (actually send to server):

svn commit . -m “I have made changes, such as…”

Checkout from server:

svn co svn://wetware.co.nz/subversion/pricespy/trunk pricespy/trunk

Posted on February 23, 2009 at 6:22 pm by Jordan Carter · Permalink
In: Web Development · Tagged with: 

2 Responses

  1. Written by Aaron Davidson
    on February 25, 2009 at 8:34 am
    Permalink

    Hi Jordan, just wondering what sort of iPhone projects you’re involved in and whether you’re out on your own or working in a development shop?

    Best regards,
    Aaron.

  2. Written by Jordan
    on February 25, 2009 at 3:54 pm
    Permalink

    Hey Aaron,

    The app is to support our company’s website and allow quick access to a couple of specific functions. It is requiring interaction with Rails, which our website is built on.

    So I’m in a dev shop, but there is no experience in the team regarding iPhone.

    I am new to Mac’s, Unix, Objc, Rails… So, you can imagin a lot of Googling. Though there is a wealth of knowledge in the office regarding the others.

Leave a Reply