Quick TipsQuick Tips

Quick little tips about stuff

This section contains short little posts and links to other websites with "quick tips" that don't really need a whole post about them. In some cases they more or less replicate what is in online documentation but are used to bring attention to little known functions etc that my regular readers may not know about; or for quick personal reference.

Post sort order: Post Date (Newest First) | Post Date (Oldest First) | Alphabetical | Date Updated

Which version of CentOS or RHEL is running?Which version of CentOS or RHEL is running?

Posted May 1st, 2012 in Linux/Unix/BSD and Quick Tips

The uname -a command will tell you which kernel version of Linux is running but doesn't give you any information about the distribution or distro version number. This quick tip shows how to do this for CentOS / Red Hat Enterprise Linux.

Read more »

Literal tab character on the command line on Linux BASHLiteral tab character on the command line on Linux BASH

Posted September 23rd, 2011 in Linux/Unix/BSD and Quick Tips

So you need to put a tab on the command line when using BASH on Linux, Mac, BSD? How to do it? The tab character is usually used for command completion etc so typing in a tab won't render one on the command line.

Read more »

Change the timezone on CentOSChange the timezone on CentOS

Posted September 14th, 2011 in Linux/Unix/BSD and Quick Tips (Updated May 17th, 2012)

I recently needed to set up a CentOS 5 box and completely forgot how to set the timezone. There's apparantly a nice easy text GUI for doing it in RHEL but I couldn't find the same thing on the CentOS box so here's how to do it. It should also work for most Linux systems.

Read more »

Using find to locate all zero length filesUsing find to locate all zero length files

Posted August 4th, 2011 in Linux/Unix/BSD and Quick Tips

A little while ago I posted how to use the Linux/Unix/OSX find command to locate files bigger or smaller than a particular size but didn't cover how to find zero length files. This is shown here.

Read more »

Searching Gmail by dateSearching Gmail by date

Posted June 3rd, 2011 in Applications and Quick Tips

This is a quick post for my own reference to show how to search Gmail by date range. I often write little tips like this for myself so I have somewhere easy to reference them as I forget this sort of stuff all the time :)

Read more »

How to refresh the projects file tree in NetBeansHow to refresh the projects file tree in NetBeans

Posted May 6th, 2011 in Applications and Quick Tips

This issue has been bugging me for a while and I just worked out how to solve it: if you're using NetBeans and add some files to the project outside NetBeans (like copying and pasting in Finder/Explorer) then they don't show up in the list of files in the projects tree view.

Read more »

SilverStripe: Escape raw values for a SQL querySilverStripe: Escape raw values for a SQL query

Posted August 9th, 2010 in Quick Tips and SilverStripe

This is just quick little post for self reference to show how to escape values which go into a raw SQL query in SilverStripe; I find myself never being able to remember this and having to always look it up.

Read more »

PHP Quick Tip: Check if URL aware fopen wrappers are enabledPHP Quick Tip: Check if URL aware fopen wrappers are enabled

Posted July 19th, 2010 in PHP and Quick Tips

PHP supports opening remote URLs (e.g. http://www.example.com/something.htmnl) using the fopen and similar functions. It is possible to disable this function in the PHP configuration so this quick tip shows how to check if it is possible to open remote URLs.

Read more »

OSX Quick Tip: Prevent .ds_store files being written on network sharesOSX Quick Tip: Prevent .ds_store files being written on network shares

Posted June 28th, 2010 in OSX and Quick Tips

When using network shares (e.g. from Samba or Windows servers) on OSX .DS_Store files will be written out when accessing directories. This post shows how to prevent this from happening.

Read more »

Find all symbolic links with the find commandFind all symbolic links with the find command

Posted June 25th, 2010 in Linux/Unix/BSD and Quick Tips

This quick tip shows how to find all the symbolic links under a particular directory using the "find" command from the command line on UNIX based systems such as Linux, OSX and BSD.

Read more »

OSX Quick Tip: How to remove automator servicesOSX Quick Tip: How to remove automator services

Posted June 22nd, 2010 in OSX and Quick Tips

The Automator in OSX allows you to create processes, services, folder actions etc. Once you have created a service in Automator there doesn't appear to be a way to delete it in the Automater app.

Read more »

Fix "the operation can't be completed because you don't have permission to access some of the items" error on OSXFix "the operation can't be completed because you don't have permission to access some of the items" error on OSX

Posted June 20th, 2010 in OSX and Quick Tips

I run my webserver and file server from a virtual machine with the files shared using Samba (yes, now that I'm running on OSX I should really share the files with NFS but that's for another day). When trying to copy files from the Mac to the Samba share I was getting the error message "The operation can't be completed because you don't have permission to access some of the items".

Read more »

Netbeans Quick Tip: How to use tabs not spacesNetbeans Quick Tip: How to use tabs not spaces

Posted June 18th, 2010 in Quick Tips

If you are like me and you prefer to have tabs and not spaces for code indentation and are using Netbeans, it uses spaces by default. This quick little post shows how to use tabs instead.

Read more »

Netbeans Quick Tip: Syntax Highlighting and File ExtensionsNetbeans Quick Tip: Syntax Highlighting and File Extensions

Posted June 16th, 2010 in Quick Tips

If you have some random file name extension (such as .ss for SilverStripe templates) which Netbeans doesn't know about, it's easy to configure it to use the correct syntax highlighting.

Read more »

OSX Quick Tip: Show all files in the Finder including dot filesOSX Quick Tip: Show all files in the Finder including dot files

Posted June 14th, 2010 in OSX and Quick Tips

The default behavior of the Finder on OSX is to hide UNIX files such as /usr /var etc and dot files (e.g. .htaccess). This quick tip shows how to enable (or disable) showing these files.

Read more »

Skype Quick Tip: Disable "Mood Messages"Skype Quick Tip: Disable "Mood Messages"

Posted June 12th, 2010 in Quick Tips

So I just installed Skype a couple of days ago on my new Mac Mini and I keep getting these notifications that I have a message only they aren't really messages, just some stupid "Mood Message" things.

Read more »

SilverStripe Quick Tip: Enable Akismet spam filterSilverStripe Quick Tip: Enable Akismet spam filter

Posted May 23rd, 2010 in Quick Tips and SilverStripe

Any page on a SilverStripe website can have comments on it and can easily be passed through the Akismet spam filtering service to check if it is spammy. This quick tip shows how to enable Akismet in SilverStripe after you've got an API key.

Read more »

SilverStripe Quick Tip: Enable comment moderationSilverStripe Quick Tip: Enable comment moderation

Posted May 19th, 2010 in Quick Tips and SilverStripe

By default SilverStripe comments do not require moderation i.e. all comments are automatically approved and displayed on the site. This quick tip shows how to enable moderation in a SilverStripe install so the moderator has to approve all comments before they are visible.

Read more »

PHP Quick Tip: use __DIR__ instead of dirname(__FILE__) from PHP 5.3PHP Quick Tip: use __DIR__ instead of dirname(__FILE__) from PHP 5.3

Posted May 13th, 2010 in PHP and Quick Tips

The traditional way of getting the directory the current file is in with PHP is to use dirname(__FILE__). From PHP 5.3 there is a new magic constant__DIR__ which is the equivilent of this function call.

Read more »

SilverStripe Quick Tip: Comments in TemplatesSilverStripe Quick Tip: Comments in Templates

Posted May 11th, 2010 in Quick Tips and SilverStripe

It's funny how we programmers don't tend to read documentation (well I often don't tend to anyway - at least not cover to cover) and turn to search engines to find the answers to our questions. When looking for something quite different from what this post is about I stumbled across the SilverStripe templates documentation page and discovered how to put comments into a SilverStripe template that will be stripped out of the published site. So here's a quick tip to point it out to those of you who use SilverStripe and may not already know this.

Read more »