Archive for category Tech

Screen Capture in Snow Leopard

When Screen Capture command is issued the SystemUIServer runs a program named “screencapture”. This program is located at   “/usr/sbin/screencapture”. This utility has various options for taking pictures of the screen.
 

We can alter the default  ScreenCapture File Name and format in Snow Leopard by issuing the following commands in Terminal.

A. To Change default file format to jpg

    defaults write com.apple.screencapture type jpg
    killall SystemUIServer


B. To Change screen capture file name to the format [current date] at [time]

    defaults write com.apple.screencapture name “”
    killall SystemUIServer

Instead of empty string a specific name can also be given. In both the cases the second command is uses to restart the screencapture program era only then the changes made will be  effective.

Screen Capture Options:

  1. Pressing cmd+ shift+ 3 will capture the screen to a jpg file (if the default file format is jpg)
  2. Pressing cmd +ctrl +shift +3 will capture the screen to clipboard
  3. Pressing cmd+ shift +4 will give a cross-hair. Drag the cross-hair cover the desired area of the screen using left click pressed before releasing the left click will capture to  and release to capture a specific area. Pressing ctrl before releasing the mouse will capture to clipboard.
  4. Pressing cmd+ shift +4 and then the spacebar will turn the cursor to a camera which can be used to capture a specific open window from multiple open windows on the screen.

BeeDocs Timeline

Timeline: An interesting Mac OS X App that lets you draw timelines in a cool way. The videos on the site dont seem to work (on Firefox). Works on Leopard.

How to pick an open source license

A list of articles comparing licenses

  1. From ZDNet blogs: Part 1 and Part 2
  2. Milking The GNU: Picking an open source license w/o becoming brain dead
  3. Choosing an Open Source License
  4. An impassioned plea to pick a license.
  5. And finally the WTFPL.

SVN Cheat Sheet

Reference: The SVN user manual

These instructions will create a repository on your local disk with capability to support multiple projects. I use the file structure layout recommended in the SVN user guide.

Using one common repository for all projects:

Pros:

  • One place to hold all your projects. One set of hook programs/scripts.

Cons:

  • Each project may have different event triggers (e.g. who gets emailed when a check in is made). Hook scripts need to manage these issues.
  • Revision numbers are global to the repository. So though no changes have been made to a project it will still get a new rev number if some other project gets checked in.

The recommended directory structure (in svnbook):

MyMainSvnDirectory/
    Proj1/
        trunk/
        tags/
        branches/
    Proj2/
        trunk/
        tags/
        branches/

Creating a Repository:
    svnadmin create MyProjects/

This will create the following under MyProjects/

MyProjects/
    README.txt
    conf
    dav
    db          – Holds the versioned filesystem
    format
    hooks

Initial import:

    svn import Proj1 file:///Full_Path/MyProjects/Proj1/ -m “Initial import”

This will copy files in Proj1 into the directory Proj1 in the repository. After the import is done the original directory is NOT converted into a working copy. You need to check out the code in a separate directory.

Checking out code:

    svn checkout file:///Full_Path/MyProjects/Proj1 WorkingDir

This will check out the latest committed copy of Proj1 into WorkingDir

Adding a new file:
   
    svn add filename

Do this from a checked out working directory

Deleting a file:
   
    svn delete filename

Examining changes:

    svn status
    svn diff

Resolving conflicts:
   
    svn update
    svn resolve

Commit changes:

    svn commit

Browsing the repository:
   
    svn list file:///Full_Path/MyProjects
    svn list file:///Full_Path/MyProjects/trunk

Creating a branch:

    svn copy file:///Full_Path/MyProjects/Proj1/trunk file:///Full_Path/MyProjects/Proj1/braches/branch1 -m “Creating a new branch”

Creating a tag works the same way except you copy to the tags directory.

Interesting Podcasts

iPhone Programming Starter Kit

Cocoa docs that are useful to read for iPhone developers:

Links on GCC and Mach-o format

PDANet

Connect your computer to the internet via cell phone (data plan).

iPhone Jailbreak and Unlock

Pwnage 2.0 HowTo
http://news.metaparadigma.de/?p=347

Pwnage 1.1.4 Howto
http://news.metaparadigma.de/?p=109

Edit edge settings
http://news.metaparadigma.de/?p=29

Boot Neuter Howto
http://www.ilikemyiphone.com/?p=252

Microsoft “Bob” in Vi

http://www.martintoft.dk/imgs/vi-assistant.gif