Categories
BSD/Linux DrupalRecover Tech

Debian and Exim4

The one bit of switching to Debian that was difficult was setting up Exim and SMTP. I tried using the configuration off of FreeBSD but Debian just has it’s own special setup. For whatever reason the FreeBSD configuration resulted in SMTP reject errors.

This is a helpful command for debugging the exim configuration – it really helps to know what Exim4 is actually doing with all those config files!

exim -bP

So I tried the Debian approach and that worked ok for receiving mail (which the FreeBSD also did). However I still couldn’t connect with the mail client. Looking at it again if I’d read that wiki closely and followed all the instructions it would have saved me a couple of hours… I just needed to uncomment the SASL bit in /etc/exim4/exim4.conf.template. So always follow the instructions closely I suppose!

Categories
BSD/Linux DrupalRecover Tech

FreeBSD, ZFS, Rackspace, and to Debian

So the old server has always crashed quite a bit and been a bit slow for no obvious reason otherwise. So I spent some time trying to optimize the server with various things but then it occurred to me to consider this message on login:

### ZFS Tuning ###

ZFS is NOT tuned for instances with less than 1GB RAM.

For tuning 256MB and 512MB instances, the following link is recommended reading

http://wiki.freebsd.org/ZFSTuningGuide

Now the image I’m using has less than 1GB RAM so I went to that wiki and tried to do some stuff and totally messed up the performance. At least that somewhat proved to me that it was ZFS and low memory causing the random hangs. The wiki notes the ‘bursting’ behaviour of the ZFS filesystem sometimes. That’s what the server had been doing! Trying to tweak it a bit I just made it worse. There was nothing in swap and any disk based activity was REALLY SLOW. Just tarring things up after my tweaks freezes the system… Darn fancy filesystems. Combine that with I was starting to get some package issues with a mixture of compiled packages and trying ‘pkgng’ I thought I’d given Debian a try again.

Debian has no slowness issues! I’m 99% sure it was the ZFS and low memory. So as much as I like FreeBSD this I’ll use Debian. I do like apt better than pkgng anyhow, much more refined. I was almost getting into a version of RPM hell with FreeBSD there… (At least it’d never ruin the whole system with BSD though)

Anyhow switching to Debian worked fine, I can’t get the SMTP server working for some reason but everything else was easy to port. And there is no more random hanging. Also  no swap space is used at all for the same configuration, so either it very likely was ZFS that was the issue on FreeBSD.

Categories
Uncategorized

Gerrymandering

I read quite often that gerrymandering of political districts is a cause of the current mess of our republic. That’s fine and makes sense but this is a bit abstract how drawing the lines can make sure the Republican districts always stay Republican and Democrat districts stay Democrat. Or how overall it’d really affect anything. You’d think the law of large numbers or such would even everything out. This image and description from Wikipedia makes it clear why it doesn’t even everything out very well – this is all from the Wikipedia article on gerrymandering.

Example for a state with 3 equally sized districts, 15 voters and 2 parties: Plum(squares) and Orange(circles).In (a), creating 3 mixed-type districts yields a 3–0 win to Plum—a disproportional result considering the state-wide 9:6 Plum majority.

In (b), Orange wins the urban district while Plumwins the rural districts—the 2–1 result reflects the state-wide vote ratio.

In (c), gerrymandering techniques ensure a 2–1 win to the state-wide minority Orange party.

All the cases are interesting in their own way. (a) seems interesting in if you don’t do any thought to district membership the minority can lose everywhere.  You can’t just let the boundaries be indiscriminate perhaps. (c) is the opposite, the minority can rule with wise redistricting.
Categories
DrupalRecover Uncategorized

Pandora’s promise

Pandora’s Promise makes a well laid out argument as to why nuclear fission is the way we need to go for our energy needs if we want to save the planet and keep our same levels of consumption. It’s just a very well done documentary, I won’t say much so as to deflate it’s fine argument for nuclear fission. Ignore everything else I say below and just watch the movie.

It is interesting to call out that they went to outside the sacophagus in Chernobyl and the radiation level was lower than that on a beach in Brasil where people go to lay in the sand for health benefits. Also that nuclear is cleaner then every other source of energy except for wind. Also the number of ‘environmentalists’ who have come around to support nuclear is interesting. The movie is sort of an interesting commentaty on ‘environmetalism’ as well. A fine scene is when there are people protesting a nuclear power plant. They go around handing out bananas for a ‘banana break’. Of course bananas put off radioactivity along with a common lot of things.

The thing I’ve always seen is nuclear is an invisible sickness that everyone fears. However for some reason no one fears the pollution from fossil fuels or solar panel production nearly as much although (at least the fossil fuels from power generation) kill many more people than nuclear (from power generation at least) has. Maybe I should do a chart of that if I can find the data to actually support that statement!

Thanks to the wonder of the internet (don’t let anyone restrict it!) I found random proof of the statement here. A good image for the claim:

This is a nice visualization to play around with as well – of course who knows where the data comes from.

At the same rate I do like this page that shows that we are nowhere near the evacuation area of any nuclear power plant. But I still don’t like the fact that we have high air pollution days because we have many coal plants nearby. The invisible menace of radiation is scary somehow but unbreathable air is more immediate.

Categories
DrupalRecover Uncategorized

Data for charting

I think it’d be interesting to graph random data available from around the internet. To to this I used Pages for the first chart and R for the second. The data comes from the Whitehouse here:

http://m.whitehouse.gov/omb/budget/historicals

Categories
Computer DrupalRecover Tech

CSS Fun

Thanks to Codepen for the fine CSS that inspired the new header above. Very nice. Lots of neat things you can do with CSS and Javascript at Codepen. Here’s where I got the fine CSS for the above:

http://codepen.io/boldfacedesign/pen/EoGgD

Categories
Computer DrupalRecover Tech

Net neutrality and hypocrisy

Thanks to net neutrality fine internet content like this can exist and anyone can get to it for free. What a lucky dog you are! However recently a court struck down the FCC’s attempts at net neutrality.

The Republicans truly are Orwellian 99% of the time. Here we get our most recent example in a court’s recent striking down of net neutrality they claim victory for innovation and the free market.

This is what could happen if net neutrality fails and the ISPs can decide what we’re allowed to see for what cost – so much for freedom and innovation – more like cable and money:

Thanks to whoever created that image which is here: http://imgur.com/5RrWm

How is internet not just part of infrastructure? And we need the infrastrucure protected so that everyone can continue to have access to it. We don’t let water companies shut off the water if they feel like it. We expect electricity of the electric company. We regulate those to make sure they stay available to all. Anyhow if you are reading this presumably you like using the internet (regardless of whether you like this post, you do like the internet) and should want it kept accessbile for all without limit or extra fees for something that was free.

Categories
BSD/Linux DrupalRecover Tech

Fetchmail and SSL certificates

I have to search for this periodically being sites like to change their SSL certificates every once and a while. So here’s another place to look for it!

If you don’t know what Fetchmail is its a little program (maybe its gigatic, I don’t know) that fetches email for you from many different email servers. This allows me to have one place where I store all my email across all my email addresses and then I can use an IMAP email server to view it all in one place. Very nice if you’ve many different email address.

In order to do this magic you have to tell fetchmail how to login to your email accounts and its always better to do this securely over SSL. To do it over SSL you have to tell fetchmail the site’s SSL certificiate (or you could weaken fetchmail to not care to validate the certificate but that seems silly). And to do that you have to tell it in hex or other computer sprach.

So first you need to get the SSL certificate in computer sprach:

openssl s_client -connect pop3.live.com:995 -showcerts | openssl x509 -fingerprint -noout -md5

Running this will get you the certificate computer sprach entry itself that’ll look something like this:

91:63:CF:6F:DF:03:3C:B9:3E:19:B3:1C:FF:EB:3C:25

Second you need to tell fecthmail to use this id when it connects to the server in the fetchmailrc file:

poll pop3.live.com uidl protocol POP3 user “xxxyyy@live.com” there with password “ohSuchASecurePassword!@#$” is xxxx@tttt here ssl sslfingerprint ‘91:63:CF:6F:DF:03:3C:B9:3E:19:B3:1C:FF:EB:3C:25

There you have it! That’s almost a good memorable, secure password I just made up there.

Categories
Uncategorized

Random handy links I recently used! Install CM 10.2 on TF300T and create a recovery partition on Mavericks

Recently I installed CyanogenMod 10.2 (Android 4.3) on the Asus TF300T. I’d already had it on the Nook Tablet and it really seemed to be working well on the Nook. Much better than CM 10.1 (Android 4.2) on the Nook. As I’ve commented before the TF300T has become dogged slow due to its cheap flash storage. However, there is such a thing as TRIM support that was added into Android 4.3 which supposedly makes this not as bad. After installing on the TF300T it does seem to have helped a lot, almost like new! (So far)

Installing CyanogenMod on TF300T – just install CM 10.2 if you want Android 4.3:

http://blog.askseb.com/1567-unlocking-and-rooting-asus-transformer-tf300…

I also recently bought a shiny new Mac Mini and the storage seemed dogged slow on that as well. I was hoping it’d be quicker than the USB drive running the old iMac with failed internal harddrive. What with the 5400 rpm drive it just wasn’t fast and that seems to affect OS X pretty significantly. Everything seems slow to me since I’ve an SSD in the 6 year old MacBook Pro and everything is very quick just thanks to the SSD.

However, I also bought the Mac Mini knowing it had the Thunderbolt port. So I got a LaCie SSD drive with Thunderbolt, got everything moved over, and the Mac Mini is blazing fast when run off the external SSD via Thunderbolt!

The thing I forgot to do was create the ‘recovery parition’ when I copied over the old hard drive. You need this to encrypt the drive for example using File Vault. I need to find that link still but one page gave good enough instructions to do that. In summary you resize the boot partition in Disk Utility (this works fine), in Disk Utility create an image from another hard drive with the recovery image, then (again with Disk Utility) copy that image to the partition you just created. Make sure it’s the recovery partition is after the main partition. That’s easy if you just have 2 partitions.

Categories
BSD/Linux DrupalRecover Tech

Port forwarding VNC connection

One sad day our old modem failed. The phone company gave us a new DSL modem/router. I had figured out how to setup portforwarding and such on the old modem. I can’t get into the new one at all! After briefly attempting to get info out of the phone company about how to access the new modem’s admin interface to no success I gave up on all my nice old port forwards.