
Aug 4, 2009

If you do not want to see Git messages about build directories or miscellaneous scratch files then add them to your .gitignore file. To do so, create the file, add the directories/files and then add the file to git.
E.g.
touch .gitignore
Edit the file to suit your needs and then add/commit.
git add .gitignore
git commit .gitignore

Jul 10, 2009

Chkconfig is a simple utility available on Linux that allows you to register services to start/stop on bootup and shutdown. The following are the basic commands you need to know to get things going:
chkconfig --list (lists all the commands that are registered)
chkconfig --add httpd (add httpd to the chkconfig list)
chkconfig --level 35 httpd on (enables the httpd daemon to start on runlevels 3 and 5)
chkconfig --level 35 mysqld on (enables the mysqld daemon to start on runlevels 3 and 5)
chkconfig --level 35 memcached on (enables the memcached daemon to start on runlevels 3 and 5)
chkconfig --level 2345 sendmail on (enabled the sendmail daemon to start on runlevels 2, 3, 4 and 5)

Jun 5, 2009

When running OS X Leopard, many people are annoyed by the glass dock provided by default. There are several applications that can be downloaded to remove this but we found a very easy way of removing the glass dock. In a shell type:
defaults write com.apple.dock no-glass -boolean YES
Next, it is time to remove a couple of files. Type the following:
cd /System/Library/CoreServices/Dock.app/Contents/Resources
Delete the glass dock images by typing:
sudo rm -Rf bottom*.png
Now it is time to restart your dock:
killall Dock
That is all!

Feb 6, 2009

One of the more annoying features of OS X is that iPhoto automatically launches when you connect your iPhone. Apple is trying to make importing photos as easy as possible so the camera in the iPhone triggers the launching of iPhoto when connect your device. Follow the steps below to disable this feature:
- Open the Image Capture application in your Applications folder
- Click Image Capture and then Preferences in the top application navigation
- In the drop-down select “No application” for, “When a camera is connected, open.”
The following screenshot shows the Image Capture Preferences dialog:


Sep 27, 2008

If you have a list of files in a source repository that you would like SVN to ignore you can specify them by issuing the following command:
svn propedit svn:ignore .
This command pushes you to an editor window where you simply add the files/directories you would like to exclude from the repository.
Once dirctories have been added, you’ll no longer seem them flagged when you type:
svn status
Typically, people tend to add their build directory and similar temporary files/directories.
Don’t forget to commit your changes:
svn commit .

Aug 7, 2008

If you want to change your Linux hostname and you’re running Fedora or Red Hat, the steps are listed below.
Immediate Change
echo 'some.host.com' > /proc/sys/kernel/hostname
Persisted Change
This is for non-DHCP nodes.
Add your name to /etc/sysconfig/network
NETWORKING=yes
HOSTNAME="some.host.com"
If you’re node gets an IP address from a DHCP server then you can set:
DHCP_HOSTNAME="some.host.com"
in the /etc/sysconfig/network-scripts/ifcfg-eth0 file (or whatever your primary device is).
Notes
You can also add your hostname to your /etc/hosts file
10.1.1.10 some.host.com some

Jun 15, 2008

If you would like SVN to replace keywords and it’s not enabled by default then execute:
svn propset svn:keywords Id FILE_NAME
E.g.,
svn propset svn:keywords Id Test.java
In your source file you need to add: “$Id”.
E.g.
/**
* Test class.
* @author John Smith
* @version $Id$
*/
public class Test {
After you commit the file, it will look something like:
/**
* Test class.
* @author John Smith
* @version $Id: build.xml 10 2008-06-15 18:12:42Z john $
*/
public class Test {

May 3, 2008

Configuration settings for UTF-8 support in PHP.
http://www.nicknettleton.com/zine/php/php-utf-8-cheatsheet
mbstring.language = Neutral ; Set default language to Neutral(UTF-8) (default)
mbstring.internal_encoding = UTF-8 ; Set default internal encoding to UTF-8
mbstring.encoding_translation = On ; HTTP input encoding translation is enabled
mbstring.http_input = auto ; Set HTTP input character set dectection to auto
mbstring.http_output = UTF-8 ; Set HTTP output encoding to UTF-8
mbstring.detect_order = auto ; Set default character encoding detection order to auto
mbstring.substitute_character = none ; Do not print invalid characters
default_charset = UTF-8 ; Default character set for auto content type header