Unix

Linux self-education links.

Magic Folder to Convert DOC and OpenOffice to PDF

Most of the information in this post is derived from http://www.tech-faq.com/convert-word-to-pdf.html. It's posted as a service, because the code there needs some editing.

Also, a useful thread about executing OOo macros is at http://www.oooforum.org/forum/viewtopic.phtml?t=2619.

Here's the code to automate the opening and saving of a file as PDF, using Open Office. Paste this into your standard macros.

Hacker Scripts Decoded: eval gzunzip base64_encode str_rot13

I got hacked (more than once) and they installed a backdoor php shell. It sucked (and I must suck for allowing it to happen... but anyway) and here's a snippet of code that you can use to decrypt these nasties. To use it, paste the function definition for "dc" below into the hack script. Then replace that first instance of "eval" with "dc", which calls this function. Then run the script. The output will be the source of the script. View source to read it formatted correctly - and use Save As... to save it. You may need to edit the output to get it working.

function dc($s) {

Decoding gzinflate base64_decode

Some themes add a copyright notice using a technique also seen in hack scripts. They take the PHP code, and the base64 encode it, and gzip it.

VirtualBox OSE: can't find kernel driver, run modprobe vboxdrv

I got a message to run modprobe vboxdrv, but didn't seem to have the vboxdrv driver.

ProFTPd MySQL configuration tips

Setting up ProFTPd with MySQL isn't "hard" per-se, but the most popular tutorial at Khoosys is kind of complex.http://www.khoosys.net/single.htm?ipg=848It has users, groups, quotas, and a lot of accounting.  So the tables are numerous and there are a lot of queries involved.

Open Source as a Response to Microsoft's Monopoly

There are different theories on why Open Source succeeds or fails (and opinions on whether it's succeeding or failing). The most common is not a theory at all, but the idea of "giving back to the community": that companies will give away assets because they're receiving assets for free from the community. It sounds nice, but, it's a really weak idea.

FreeDOS Boot USB Flash Memory Stick

If you don't have Windows around anymore, and you need to flash your BIOS, you need to figure out a way to make a bootable floppy.

If you don't have a floppy, you can make a bootable CD.

Screen Scraping With wget (and Mailarchiva)

I was testing a new product called Mailarchiva, and I misunderstood the instructions. The upshot was that a mailbox full of messages was moved into Mailarchiva, and I wanted to restore them to the mailbox.

Cisco Console Terminal Cables

After doing some research on the subject, I was totally confused about Cisco terminal cables. These are just regular serial cables, with with all kinds of weird "cisco-y" features. The big tutorials on the web really confuse the issue by trying to cover every possible type of cable.

Turn URLs into Links Without Affecting Existing Links (and a gripe about collective stupidity)

This is one of those problems that has been solved, but, it's been solved in incomplete ways so many times that these not-too-useful answers outnumber the useful answers, totally messing up web searches. This consequently seeds the idea that this is an intractable problem! Even at stackoverflow, they say it's really tough.

Move Files into a Directory Named for the Modification Date

This script is being used to move files around in a Maildir. A bunch of spam goes into the "new" directory.

Change Web Host Company Without Downtime (Linux or BSD oriented)

This outlines how to change web hosts with minimal downtime. It won't go step by step, or explain, too much.

HOWTO: An EXIM + Spamassassin Mail Filter

The office was experiencing more spam, with a disproportionate effect on mobile phones. The existing spam catching gauntlet was operating well for desktop clients, but mobile phone users weren't benefiting because most scanning and removal ocurred after the messages got into the inbox. This meant that, often, spam was forwarded to the mobile phone before it got detected.

My abatement strategy was to filter mail before the message got to the mail server. One option is an external mail filter, like Postini. My choice, described below, was to set up Spamassassin anti spam software on an in-house Linux box.

Another Cheap Thumb Gallery Maker

One thing about scripting is that, sometimes, a little fragment of code will get used over and over, and it's not a full-featured app. This script just looks over a directory full of specially named files, and produce a "photo gallery" for it.

Hundreds of these scripts have been modified to do all kinds of cool things, but this one doesn't do any of those things. The script just gets copied into a directory, and it produces an index of images.

Scripts like this won't ever die. They won't get replaced by more elaborate scripts.

Moving Your Linux Root Partition

*[This article is somewhat obsolete because we can use UIDs to identify disks.]*

I had a pretty fast IDE drive, but finally got a much faster SATA drive. I partitioned it with a large /home, and a smaller empty partition. The intention was to load the latest, new version of Ubuntu onto the empty partition on the SATA drive (and mounted as root), and retain the /home partition already on the SATA drive. Unfortunately, Ubuntu's installer would not install onto the empty partition without formatting both partitions. The installer will upgrade a system in-place; it'll reformat a new system; but it won't install into an empty partition, leaving the other partitions intact.

Syndicate content