25 October 2016

Set CentOS clock to use UTC

rm -f /etc/localtime
ln -s /usr/share/zoneinfo/UTC /etc/localtime

20 September 2016

Use ntp on CentOS

ntp - network time protocol
yum install ntp
chkconfig ntpd on
ntpdate pool.ntp.org
service ntpd start

01 August 2016

Create Git Repository

You can easily create a git repository by running the below command
git init --bare --share /path/to/my.repository.git
You can clone that Git repository using the follwing command
git clone --local /path/to/my.repository.git

30 March 2016

SyntaxHighlighter

Use the below to enclose the code that needs to be highlighted.
<pre class="brush: bash">
</pre>
bash can be replaced with css, xml, jscript, php, python, ruby

I'm assuming that you are using SyntaxHighlighter, and also have installed the associated shBrushXXX.js file

23 February 2016

Using vi with cron

Override default editor used by crontab or root
VISUAL=vi crontab -e

Giving Power the Corect Way

The correct way to appoint sudoers is by putting the definition in /etc/sudoers.d/filename-init

The content would look something like this.
newusername ALL=(ALL) NOPASSWD:ALL