Real-Time Network Traffic Stats On FreeBSD
Quick one here, to get real-time traffic stats on FreeBSD just run the following command
1systat -ifstat
Copying Content From A Word Document To A CKEDitor
So I’ve been assisting a customer with their website and I was helping them with some data entry. Most of the content they sent me was in MS Word format. Copying the text directly to Drupal’s CKEditor had all formatting messed up so I was copying to notepad, copying from there to Drupal and then formatting manually. This turned out to be a nightmare when I had to copy 10 tables in a single page.
'apt-get update' Failing After A Fresh Ubuntu 12.04 Installation
So I’m currently working with a customer that requires Ubuntu 12.04 for their servers since their apps were built and tested on that version, so every new install I run into the following issue
Adding 'on behalf of' To Outgoing Emails With Postfix
I used to be a big fan of Mandrill . I used to use it as an email gateway for my personal servers. It’s easy to use and it’s cheap (Or free if you send less than 12,000 emails per month). I liked not having to setup SPF , DKIM , and DMARC for my small setups. Even for smaller clients I wouldn’t bother with that and just use Mandrill. Emails just show up with the following sender
Randomize Source IP Addresses With Postfix
Sometimes when you have a high number of outgoing messages services like Yahoo! and Gmail might block you. To prevent that you need to distribute your outgoing emails through a set of IPs. I used HAProxy for that along with a number of FreeBSD Jails. That solution is a bit tedious, even though after I started using Salt things became a bit easier it was still too complicated for my taste.
Corrupted image_captcha In Drupal
I have noticed that the image_captcha Drupal module has been showing empty images on some of the websites I administer. When checking the cause of this I tried to view the image directly and got:
Moving A Magento Instance To A New Domain
Quick one here, when you move a Magento instance to a new domain or URL it will keep redirecting to the old address. There is a quick fix
Bootstrapping PKGNG From Your Own Repository
HOWTO: Small Mail Server With Salt, Dovecot, And OpenSMTPD
Update: Sadly OpenSMTPD version 5.4.4 on FreeBSD broke the passwd table, I’m checking the Gills to get this fixed.
Update2: I am no longer using OpenSMTPD. I’ve switched to dma for servers that only need to send emails and went back to Postfix for servers that require an actual MTA. Not that OpenSMTPD is bad, I just prefer Postfix. I might reconcider in the future when OpenSMTPD is more mature.
Perl One-liner To Generate htpasswd Passwords
Update: An easier way to do it that doesn’t require you to install anything special (Works with nginx)
1openssl passwd -apr1
Instead of having to install Apache or use an untrusted website just to generate the required password, you can use the following perl one liner
1perl -e 'chomp($password=<>);chomp($salt=`tr -dc A-Za-z0-9 </dev/urandom | head -c 1024`); print crypt($password,$salt)."\n";'
About Me
Dev gone Ops gone DevOps. Any views expressed on this blog are mine alone and do not necessarily reflect the views of my employer.
Recent Posts