Author's posts

More cron stuff in Ubuntu

So, I needed to make a cron job that runs every hour. This is crazy simple; at least in Ubuntu! Ubuntu has folders in the /etc/ folder… cron.daily cron.hourly cron.monthly cron.weekly It's pretty easy. As long as you don't need to control exactly when a process executes, just throw a script file in one of …

Continue reading

Self Signing a Certificate for a Test Server

While messing around with a new membership database I ran into a wall. The script that gives me a web interface simply would not continue until I secured my connection properly. So, I found myself in need of a do-it-yourself certificate (since I wasn't willing to pay $500+ for a real certificate yet). I found …

Continue reading

Strip out a bracketed piece of text using PHP

In WordPress I have a free, third-party theme that is displaying my image captions in article excerpts for some reason. The captions show up as a sort of bracketed markup. I tracked down the part of code that prepares the article excerpts and ran this regular expression to strip out any square-bracketed text: The 'Us' …

Continue reading

Parsing web logs with grep

When trying to use a web access log analysis tool I found that it was incorrectly parsing logs for data from my site. (How do I know it was incorrectly parsing the data? Because it returned results saying that I'd received traffic at the site months before the site owner had even approached me about …

Continue reading

Remove a directory: rm -rf

I've Googled this about 10 times now, maybe if I write it down I'll remember: The -r means recursive, and the -f means force; which means it will ignore the fact that the directory is full.

Samba: Meh.

I'll start by saying Samba is not as easy as it should be, even when it's fully set up and working, but it gets the job done, and SFTP gets so tedious after a while. Here's what I had to do to get it working. First, install it: apt-get install samba Next, edit /etc/samba/smb.conf and …

Continue reading

There's inheritance, and then there's inheritance

…no, not the money kind of inheritance. I'm talking about the ownership and permissions in Linux. Linux permissions are tricky for a Windows guy like me. When I copy a file to a directory on a server I expect the file to inherit the permission of the containing folder on the server. Period. Why? Because …

Continue reading

Hrmph, you mean GD wasn't installed?

I couldn't embed thumbnail sizes on my new WordPress install on my new Ubuntu server; I could only embed the original size (which was 3072×2048). The options to embed other sizes were just grayed out. It turns out that the default LAMP install doesn't include php-gd, the graphics library that creates thumbnails. Well… I guess …

Continue reading

CSS is crap!

…not that I want to go back to straight HTML, because that's crap, but CSS is crap too. After pulling my hair out for a bit and wondering why my styles weren't applying I found this helpful article on CSS specificity. Here's the good part: Element, Pseudo Element: d = 1 – (0,0,0,1) Class, Pseudo …

Continue reading

ProFTPd, Ubuntu, pfSense, and 3.5 hours

Given those four elements, ProFTPd, Ubuntu, pfSense, and 3.5 hours, I was able to get an FTP server working. There's a couple sticky points I'd like to note: To get FTP to work pfSense requires you to use CARP instead of Proxy ARP for your Virtual IP. That, and you have to enable (by un-checking) …

Continue reading