Archive for August, 2010

Tomcat: Installing mod_jk with Apache on Linux

Friday, August 27th, 2010

1) Download Mod_JK

2) Copy it in the /etc/httpd/module as jk_module.so

3) Add the following in the /etc/httpd/httpd.conf

LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel info

4) Have the following in workers.properties

worker.list=workerD,worker81

#workerD (default) 8080
worker.workerD.type=ajp13
worker.workerD.host=localhost
worker.workerD.port=8009

worker.worker81.type=ajp13
worker.worker81.host=localhost
worker.worker81.port=8109

Simple WebApp to create mock data

Wednesday, August 25th, 2010

http://www.generatedata.com/#generator

Xcode: adding folder path to access bundle files (iOS)

Tuesday, August 24th, 2010

Source: BenODwyer

Creating a “Group” in XCode doesn’t create a real Directory within your app Bundle.

You need to import the directory into your app using the following method:

Create a Directory on your Mac.

Select to Add Existing Files to your project

Select the Directory you want to import

In the pop-up window make sure you select “Copy items into destination group’s folder” and “Create Folder References for any added folders”

Hit “Add”

Your done!

The Directory should appear blue instead of yellow.

Now try your code:

Code

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"w1" ofType:@"geo" inDirectory:@"part1"];

Pics: Great Photoshop Free downloads

Sunday, August 22nd, 2010

http://www.graphicsfuel.com/

OSX: Set Mac hostname (i.e. avoid perforce workspace issues)

Tuesday, August 17th, 2010

To set the hostname of your Mac, do:

sudo scutil --set HostName myhostname.local

To check your hostname:

hostname

Source: Change the hostname in a Mac

This is particularly useful when using perforce from different location. Perforce link a hostname to a workspace, and OSX seems to take the hostname based on the network (in some occasions). So, you can end up with an error like:
Client ‘jeremy_MBPro_4′ can only be used from host ‘dyn105.sm1.corp.agkn.net’.

OSX: Add autocomplete for git on Mac

Tuesday, August 17th, 2010

in the home folder (~), edit (or create) the .profile file with the following

# Set git autocompletion and PS1 integration
if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then
  . /usr/local/git/contrib/completion/git-completion.bash
fi
GIT_PS1_SHOWDIRTYSTATE=true

if [ -f /opt/local/etc/bash_completion ]; then
    . /opt/local/etc/bash_completion
fi

PS1='[33[32m]u@h[33[00m]:[33[34m]w[33[31m]$(__git_ps1)[33[00m]$'

Source GIT Autocomplettion and enhancement

OSX: Mac keyboard Shortcuts

Monday, August 16th, 2010
  • Shift + CMD + / : Show application help menu with search for all the application menu.

Source: atmac.org – simple keyboard shortcuts

Apple keyboard knowledge base

OSX: Java FAQ for Mac

Monday, August 16th, 2010

http://developer.apple.com/java/faq/

Linux: Install Apache with Yum

Monday, August 16th, 2010
yum install httpd
yum install mod_ssl

Source: Installing Apache, PHP, and MySQL on Fedora Core

jQuery: Mobile Design (Phone, Tablet, & Desktop)

Monday, August 16th, 2010

http://jquerymobile.com/designs/