Linux / Freebsd

How to find incremental numbers in a file and increase them by a certain amount with perl and SED

Mar 7th, 2014 | By

So let’s say you have a file and in it is ton of field ID’s, something like this  <field id=”68″ size=”medium” type=”checkbox”> What you want to do is take the first 68 of these fields as well as all of their code and then append these new 68 fields and all of their code onto
[continue reading...]



How to make an automated connection checker and IP blocker for your server

Mar 23rd, 2013 | By

I like to think of it as a door man for my server, or my little centurion  What this little guy does is checked the last 5 hours of access logs to your server to see if there are any IP’s that are hitting your server an unusually high amount of times.  If it finds
[continue reading...]



Changing vmail user passwords in mysql with phpMyAdmin

Mar 6th, 2013 | By

So I had a bit of a head scratcher with this one today as I’m used to changing passwords in wordpress by going into the user’s table and typing the password in the value box and choosing md5 in the function dropdown window.  Well that just ended up in disaster for vmail. It ends up
[continue reading...]



Properly setting up an SSL cert for a site running on a Debian/Linux server with Apache 2.2, mod_ssl and Nginx

Jan 17th, 2013 | By

Well after doing this and redoing it again and spending way too much time re-learning how to do it the second time I’m just going to bite the bullet and take the extra hour to blog about the process so that  next time I can just follow my easy step-by-step guide(and hopefully you can too
[continue reading...]



Preventing a server melt-down and saving resources: Block all Shit bot

Oct 11th, 2012 | By

Alright, I woke up today to a load average of 75.. Seventy-fucking-FIVE.  I didn’t even know that shit was possible and I’m pretty sure the guys at the DC were probably roasting marshmellows over my glowing box.  I couldn’t believe it so into my server I went, waiting 5 minuets for every command I typed
[continue reading...]



Cannot remove nvidia package because of No diversion ‘diversion ?

Oct 1st, 2012 | By

Got this error today: Fetched 1,845 kB in 2s (853 kB/s) (Reading database … 213548 files and directories currently installed.) Removing libgl1-nvidia-alternatives … No diversion ‘diversion of /usr/lib/libGL.so.1.2 to /usr/lib/nvidia/diversions/libGL.so.1.2 by libgl1-nvidia-alternatives’, none removed. Removing ‘diversion of /usr/lib/libGL.so.1 to /usr/lib/nvidia/diversions/libGL.so.1 by libgl1-nvidia-alternatives’ dpkg-divert: rename involves overwriting `/usr/lib/libGL.so.1′ with different file `/usr/lib/nvidia/diversions/libGL.so.1′, not allowed dpkg: error
[continue reading...]



Problems mounting shared folders in a Debian Virtual OS running in a Windows Host

Sep 30th, 2012 | By

So this was a silly problem I ran into today and it’s really only the lack of very specifically labeled help available online about that caused me to write this.  Basically what I did was to install Debian 6 64 with vmware inside of a windows 7 machine.  I cringe to think I am doing
[continue reading...]



Need to get a bunch of pgp keys for your 3rd party linux repos fast?

Aug 31st, 2012 | By

Are you reinstalling your OS and having mroe than a few 3rd party repos that need to have pgp keys installed to access?  Are you dreading the processing of googling them all and wgetting the keys and then importing them? dread no more because there’s an easier way!  Just use the MIT keyserver to grab
[continue reading...]



A few words about custom partitions and /var

Aug 30th, 2012 | By

So I just installed Debian onto my new laptop, this time through vmware with a windows 7 host because I for once have enough ram and cpu to handle virtualization, and this time I felt I was ready to custom configure a more complex partition schema based on my experience.  Not the recommended BS that
[continue reading...]



Database wide search and replace script

Aug 21st, 2012 | By

Just something I thought that I would post as I needed a quick solution to do a search and replace of an entire Mysql Database.  It’s actually dumping the DB, searching and replacing the dump file and then re-importing it.  But it does the trick   #!/bin/bash if (($# >= 1)) ; then if (($#
[continue reading...]