ack = a better grep "ignores most of the crap you don't want to search"

If you've ever use grep to search a svn directory you'll know the issues re .svn folders, easiest solution is to use ack from http://betterthangrep.com/

Why: 
- refer point 5 below "ack ignores most of the crap you don't want to search" 

How to install:

- "curl http://betterthangrep.com/ack-standalone > ~/bin/ack && chmod 0755 !#:3"

Top reasons to use ack instead of grep.

  • It's blazingly fast because it only searches the stuff you want searched.
  • ack is pure Perl, so it runs on Windows just fine.
  • The standalone version uses no non-standard modules, so you can put it in your ~/bin without fear.
  • Searches recursively through directories by default, while ignoring .svn, CVS and other VCS directories.
    • Which would you rather type?
    • $ grep pattern $(find . -type f | grep -v '\.svn')
    • $ ack pattern
  • ack ignores most of the crap you don't want to search
    • VCS directories
    • blib, the Perl build directory
    • backup files like foo~ and #foo#
    • binary files, core dumps, etc
  • Ignoring .svn directories means that ack is faster than grep for searching through trees
  • Lets you specify file types to search, as in --perl or --nohtml
    • Which would you rather type?
    • $ grep pattern $(find . -name '*.pl' -or -name '*.pm' -or -name '*.pod' | grep -v .svn)
    • $ ack --perl pattern
    • Note that ack's --perl also checks the shebang lines of files without suffixes, which the find command will not
  • File-filtering capabilities usable without searching with ack -f. This lets you create lists of files of a given type
    • $ ack -f --perl > all-perl-files
  • Color highlighting of search results
enjoy

Simple Invoices 2010.2 Update 1 has been released

Hi Guys,

Simple Invoices 2010.2 Update 1 has been released

You can grab the download from:

Whats new:
  * This releases fixes the edit customer issue in 2010.2

Documentation:
  * Installing Simple Invoices: http://www.simpleinvoices.org/install 
  * Upgrading Simple Invoices: http://www.simpleinvoices.org/wiki/upgrade 
  * Simple Invoices help: http://www.simpleinvoices.org/help 
  * Frequently Asked Questions: http://www.simpleinvoices.org/wiki/faqs 
  * Simple Invoices config file options: http://www.simpleinvoices.org/config 

If you have any issues or queries please post here in the forum

Cheers

Justin

.htaccess and Apache VirtualDocumentRoot

If you using VirtualDocumentRoot in your Apache set you need to make a minor change to your .htaccess rewrites to make them work 
- just add a slash before the url and it'll work 

refer below

from: 
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?([a-zA-Z0-9_]+)-([a-zA-Z0-9_]+)$ index.php?module=$1&view=$2 [L]

to: 
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/?([a-zA-Z0-9_]+)-([a-zA-Z0-9_]+)$ /index.php?module=$1&view=$2 [L]

Connecting to an OpenVPN (untangle) network from linux: How to

Just connected to an OpenVPN (untangle) network from linux and it was super easy (way easier than a normal cisco vpn anyway)

All you have to do is:

install the openvpn client for your distro and  get your config files from the network admin
-- the files should look somethign like below
--- replace 'xyz-co' with and 'you' with your username

xyz-co.conf
xyz-co.ovpn
untangle-vpn/
untangle-vpn/xyz-co-ca.crt
untangle-vpn/xyz-co-you.crt
untangle-vpn/xyz-co-you.key

copy the above files into your /etc/openvpn directory

then connect using the below command

sudo openvpn /etc/openvpn/xyz-co.conf

all done - too easy

Pinboard.in/Delicious.com -> Chrome bookmark syncing : How to

Since Chrome was first released I wanted an easy way to get my Delicious.com and Pinboard.in bookmarks syncing to Chrome's internal bookmarks.  Why ? So I could just type stuff in the address bar and it would search my online bookmarks.

Given that the delicious chrome extension is crap and pinboard.in doesn't have one that integrates with the internal bookmarks i created a simple PHP script to make it happen

To sync your pinboard.in or delicious.com bookmarks to chrome follow the below steps

  1. install RSS Live Links - https://chrome.google.com/extensions/detail/hcamnijgggppihioleoenjmlnakejdph
  2. stick the below PHP script on a server somewhere and adjust the 3 config options for your bookmarking service
  3. in chrome go to the options section of RSS Live Links and add in the path to the php script in Step 2
  4. Save the options 
  5. Add a bookmarks folder call 'RSS Live Links' into your Chrome bookmarks - bookmarks toolbar is best

Done, now the Chrome will grab your bookmarks and sync to the bookmark folder every few minutes

 

How to add Wikipedia as a Chrome search engine

For a simple way to add Wikpedia into Chrome as a search engine follow the below steps:

in Chrome go to Tools menu, then Options, and in the Default Search section click Manage

then click Add and enter the below details in the available fields

Name: Wikipedia
Keyword: wiki

refer image below:


No in chrome just type wiki followed by where you want, ie 'wiki php' in the chrome address box (refer image below) and chrome will now search wikipedia for that term


simple 1 file contact page updated

My simple 1 page/file php/jquery contact form has now been updated to include very simple spam detection - based on http://devgrow.com/examples/honeypot/

since implementing this on my contact form: http://justin.kelly.org.au/#contact_form i haven't had any more comment/form spam
-- its a very simple method - but it works