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: 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.
by: Brooks Swinnerton on March 3, 2010
| Posted in: Blog > Technology
I find out cool new commands for linux almost every day, most of them I forget by tomorrow but none-the-less this one is definitely worth noting.
It's called screen. Available from a simple:
apt-get install screen
What this allows you to do is emulate the linux terminal (maybe mac too, I haven't looked into it). I know that sounds like a bunch of jargon, but in lam en's terms it means that you can connect to the same terminal session on two computers, and if say one connection goes down your session doesn't! It keeps running until you reconnect to it:
screen -x [sessionname]
or close it:
ctrl a > : > quit
and to name the session so that you can easily retrieve it:
screen -S [sessionname]
and lastly, to list all of you current sessions:
screen -ls