by: Brooks Swinnerton on July 22, 2010
| Posted in: Blog > Technology
I know this is old news, but for anyone that follows along here are some firefox hacks to speed it up:
Start by typing about:config in the address bar.
You're going to want to search for the following:
network.http.pipelining and double click it to set it to true and then,
network.http.proxy.pipelining , set it to true.
Next is network.http.pipelining.maxrequests. This is the amount of requests that firefox makes to a given website when you view it. The more requests, the faster it loads. You can set this to a number like 20.
And lastly, right click in the whitespace and click new > integer. We're going to name it nglayout.initialpaint.delay and set it to 0.
by: Brooks Swinnerton on May 20, 2010
| Posted in: Blog > Technology
Seriously, with Google collecting everyone's wireless data (on accident ..big whoops), Apple and the whole flash fiasco, and now Facebook's privacy settings!?
It's ludacris!
by: Brooks Swinnerton on May 4, 2010
| Posted in: Blog > Technology
This is a quick way of learning spam from all of your ISPConfig clients by running a quick and simple command. Please note that this is for ISPConfig 3, not 2 (for version 2, see here)
You can start out by creating a new file in /bin. For example sa_learn.
nano /bin/sa_learn
Now once you are in that file you can paste the following:
#!/bin/bash
/usr/bin/sa-learn --spam /var/vmail/*/*/.Junk/*/*
/usr/bin/sa-learn --ham /var/vmail/*/*/cur/*
The first part to this code is the directory of the SpamAssassin learning script, when putting in the --spam it learns it as spam, and --ham learns it has "good" messages. The second part to this code is the directory to your clients' spam folders. So once this is all done, you can learn all spam in your customers' spam folders.
After you have saved that file by clicking ctrl x, you will want to make it executable by doing the following command:
chmod o+x /bin/sa_learn
And then now from the command prompt you can simply type
sa_learn
and it will learn spam and ham!
by: Brooks Swinnerton on April 30, 2010
| Posted in: Blog > Technology
Just installed Ubuntu 10.04 LTS Desktop on a parallels 5 VM today. Of course one of the first things that I jumped for was the visual effects, but kept running into a pesky error message saying "Desktop effects could not be enabled."
So how do you fix it? Easy.
Open up the terminal: Applications > Utilities > Terminal
and edit the following file with the command: nano /etc/ld.so.conf
And we'll want to add /usr/lib to the top of the file.
After that run ldconfig in the terminal to rebuild the loader cache and you should be good!
by: Original author unkown on April 12, 2010
Start with a cage containing five monkeys.
Inside the cage, hang a banana on a string and place a set of stairs under it. Before long, a monkey will go to the stairs and start to climb towards the banana. As soon as he touches the stairs, spray all of the other monkeys with cold water.
After a while, another monkey makes an attempt with the same result - all the other monkeys are sprayed with cold water. Pretty soon, when another monkey tries to climb the stairs, the other monkeys will try to prevent it.
Now, put away the cold water. Remove one monkey from the cage and replace it with a new one. The new monkey sees the banana and wants to climb the stairs. To his surprise and horror, all of the other monkeys attack him.
After another attempt and attack, he knows that if he tries to climb the stairs, he will be assaulted.
Next, remove another of the original five monkeys and replace it with a new one. The newcomer goes to the stairs and is attacked. The previous newcomer takes part in the punishment with enthusiasm! Likewise, replace a third original monkey with a new one, then a fourth, then the fifth. Every time the newest monkey takes to the stairs, he is attacked.
Most of the monkeys that are beating him have no idea why they were not permitted to climb the stairs or why they are participating in the beating of the newest monkey.
After replacing all the original monkeys, none of the remaining monkeys have ever been sprayed with cold water. Nevertheless, no monkey ever again approaches the stairs to try for the banana. Why not? Because as far as they know that's the way it's always been done round here.
And that, my friends, is how company policies are made.
by: Brooks Swinnerton on March 22, 2010
| Posted in: Blog > Technology
Ever since I started using ubuntu I haven't strayed away from the nano text editor. It's simple to use, quick and efficient. But as I dive further into linux it seems that only the new users use nano over it's much more powerful brother: vim.
I'm starting to switch over to vim, but one of the biggest problems that I have with it is that it's default colorscheme is one heck of an eyesore to stare at all day. There are a few developers out there who have created awesome themes like Hans Fugal's desert theme, but I just couldn't seem to get it to work over an SSH connection.
So here's how I was able to get it working over SSH:
I started by using this edited version of the desert theme, called desert256 and putting it into ~/.vim/colors/
Once you have done this you must make sure that you're using a capable terminal that supports 256 colors rather than the default 16 in SSH. Which can be checked by downloading this perlscript that will show you some colorcubes.
If you get a full range of colors you can move onto the next step: setting the default scheme in vim.
You'll want to fire up you favorite texteditor (it better be vim by now) and edit ~/.vimrc and paste the following:
syntax on
set t_Co=256
colorscheme desert256
And you're done! Next time that you open up vim, it should have a colorscheme looking something like this.
by: Brooks Swinnerton on March 16, 2010
| Posted in: Blog > Technology
Okay, so this is step one of a program that I hope to design in the coming months. If you're familiar with fail2ban, then you know that it can constantly be banning and unbanning ip addresses. If you're like me and send an email to the abuse handler of that ip address range, this program will eventually send out an email to that account with a summary of what happened and the attached log file.
Of course there will be quite a bit of improvements down the road, but here is the first part of the code to grep the ip address from the file:
cat /var/log/fail2ban.log | egrep -o 'Ban [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'
I'll be updating it more as time passes.