Archive for November, 2010

h1

PHP Html Forms (QuickForm)

November 11, 2010

Good tutorial on using the QuickForm form builder and validator for PHP. This is used in Moodle.

http://www.midnighthax.com/quickform.php

Advertisements
h1

Getting Java running from Maven

November 3, 2010

Good site describing how to get Java applications compiled, tested and run from mvn:

http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/

h1

Ignoring files with git

November 2, 2010

Git is a great version control system whose greatest advantage is not filling every directory in your project with needless additional files. It just stores things in a top level directory called .git. If you want to remove a project from version control, just delete the .git directory, easy!

To ignore directories in a project and not version them with the rest of the project, create a top level file at the same level as the .git directory called .gitignore and list each folder you want to be ignored in here. You can also ignore file types using the *.file pattern matching.

h1

Scala syntax highlighting in VIM

November 2, 2010

To get SCALA syntax highlighting in Vim do the following:

1. Download the scala.vim file from here http://github.com/vim-scripts/scala.vim

2. Save it somewhere you can find it (e.g. your ~/.vim/syntax directory; you may need to create this)

3. Edit your ~/.vimrc file and add the following:

au BufRead,BufNewFile *.scala set filetype=scala
au! Syntax scala source ~/.vim/syntax/scala.vim

4. open a .scala file in vim and you should find some basic syntax highlighting working. Great!