kieranbarnes do you know where your towel is?

Bad times, I had to use a book from the monitor stand today

Posted on July 16, 2010

Installing memcached on CentOS (cPanel)

Posted on January 23, 2010

Welcome to hell. No really, compared to installing memcached on Ubuntu, CentOSs really sucks. CentOS really sucks for package management.  Really sucks. Anyway, on to the point.

Here's how I installed memcached on CentOS, which I mainly use for cPanel.

[Snippet] Stop Windows Update irritating you to restart after updates

Posted on January 23, 2010

I've been irritated to reboot my laptop every fifteen minutes to reboot my laptop. Its never convenient is it.

Click Start, Run and type net stop wuauserv

Filed under: Geeky, Windows 1 Comment

Simple install of memcached on Ubuntu

Posted on January 22, 2010

Memcached is a free, high performance distributed memory object caching system. In English, it can make your single server PHP applications faster or for a little more technical users you can write cache and share cache objects over a web server farm or cluster. Great, eh.

No seriously, it can really make your PHP faster.

Filed under: Geeky, Linux Continue reading

Insert Coin

Posted on July 17, 2009

Bored at work? This script connects to a JetDirect equipped HP printer and uses HP's control language to set the ready message on the LCD display. Takes an IP address and message on the command line. My favorite message is "INSERT COIN".

Keep in mind the limitations of the display when composing your clever verbiage.

insert_coin

#!/usr/bin/perl
# $Id: hpsetdisp.pl 11 2006-03-22 01:21:03Z yaakov $

# hpsetdisp.pl

use strict;
use warnings;

unless (@ARGV) { print "usage: $0 \"\"\n" ; exit }
if ($ARGV[3]) { print "Did you forget the quotes around your clever
message?\n" ; exit }

my $peeraddr = $ARGV[0];
my $rdymsg = $ARGV[1];
chomp $peeraddr;

use IO::Socket;
my $socket = IO::Socket::INET->new(
PeerAddr => $peeraddr,
PeerPort => "9100",
Proto => "tcp",
Type => SOCK_STREAM
) or die "Could not create socket: $!";

my $data = <
\e%-12345X\@PJL JOB
\@PJL RDYMSG DISPLAY="$rdymsg"
\@PJL EOJ
\e%-12345X
EOJ
;

print $socket $data;


Filed under: Geeky No Comments

Using SCP to copy files between Linux servers

Posted on April 4, 2009

even a gnome shell can look goodSCP? SCP is a method of securely transferring files between a local and a remote host or between two remote hosts, using the Secure Shell (SSH) protocol.

Sounds confusing?

Filed under: Geeky, Linux Continue reading

Permanently mount a Windows share in Linux

Posted on April 4, 2009

A Terrabyte?Sick of manually mounting a Windows share on Linux with "mount" for it to drop off randomly? Or not really knowing if it is mounted or not?

Then make a permanent mount in fstab.

Block Countries in Apache

Posted on November 18, 2008

Assuming you have mod_geoip installed in apache we can block certain countries in 6 lines of code.

I had a client who was experiencing an inhumane amount of spam on their phpBB forums, which are notorious for bot attacks. Luckily this forum was geographically specific - so we can block all the countries we aren't interested in.

Filed under: Apache, Geeky Continue reading

Install Imagemagick / Imagick for PHP on Ubuntu

Posted on July 7, 2008

No problem if you want to install imagemagick on your server, Ubuntu makes this very easy for you with only a few simple commands.

Filed under: Geeky, Linux Continue reading

Find text within files

Posted on May 1, 2008

Stuck trying to find text within files on Linux?

cd /directory_tree_you_want_to_search
find . -type f -exec grep -l "string to find" {} \; -print

Easy!

Filed under: Geeky, Linux 2 Comments