Tag Archives: Software

TextFileToTable Version 1.1

NEVER MIND. THE GNU PROJECT IMPRESSES AGAIN.

Please check out the org-mode to emacs for a program that did all this years ago.

http://orgmode.org/

Made a small change to the TextFileToTable script.  Now the user is able to exploit more of the Text::ASCIITable work with the addition of horizontal lines.

By inserting a ‘<<hr>>’ on a line by itself, the program will put another horizontal rule there.

# COMMAND

perl TextFileToTable.pl [delimiter] [File to be read]
perl TextFileToTable.pl \& data.txt

# INPUT

ID&Fruit&Color
1&apple&red
2&banana&yellow
<<hr>>
3&orange&orange

# OUTPUT

.----------------------.
| ID | Fruit  | Color  |
+----+--------+--------+
|  1 | apple  | red    |
|  2 | banana | yellow |
+----+--------+--------+
|  3 | orange | orange |
'----+--------+--------'

Grab the new script here:
http://www.megaupload.com/?d=H0N17GF9

Advertisements

Leave a comment

Filed under Computing, Content

Compiling Mozilla Firefox on 32-bit Ubuntu Linux


Remember to double-check these procedures against what is posted on https://developer.mozilla.org/ and your own common sense. Developmental software can change quickly and requirements come and go.



If you want the newest version in development, this is the only way to go.

Everything here is merely a re-hashing of the guidelines set forth by Mozilla. The beginning of the procedure can be found here.

This was done on Linux Mint 6.0. This is a derivative of Ubuntu, so it should work there, too. In other words, this article is meant for Debian-like operating systems with apt-get.

To start, install what Mozilla deems the absolute basics. You may or may not already have some of these. Merely run the bold command in a terminal, or hunt and peck through your package manager for the individual files. They should appear in the package manager exactly as they are listed here.

sudo apt-get install mercurial libasound2-dev libcurl4-openssl-dev python-setuptools python-dev build-essential

Mercurial (the code grabber) may not be completely updated from this. To get the latest version:

sudo easy_install -U mercurial

Now we need to configure Mercurial. Only developers need a merger program, but we will install one anyway. I recommend “meld.”

sudo apt-get install meld

Open up the file “/etc/mercurial/hgrc” with root privileges. For example:

sudo vim /etc/mercurial/hgrc

Drop this into there:


[ui]
username = Your Real Name
merge = your-merge-program (or internal:merge)

[diff]
git = 1

[defaults]
diff=-p -U 8


It should look something like this:

Now, to get the bloody-fresh new code. Download it via Mercurial and then enter the directory we just created. I would recommend entering this command from inside a “Projects” folder. Do not do this near anything important, or those files will get lost in the mess.

hg clone http://hg.mozilla.org/mozilla-central/ src

cd src

Downloading Using Mercurial

Downloading Using Mercurial

Now we need to install automake Version 2.13 because Firefox is picky about that.

sudo apt-get install automake2.13

We need to create a file called “.mozconfig” to handle some details for us. Make sure you are in the top level directory (src) if you are following this exactly) of all the source you just downloaded. Then copy and paste these lines:

echo ‘. $topsrcdir/browser/config/mozconfig’ > .mozconfig

echo ‘mk_add_options AUTOCONF=autoconf2.13’ >> .mozconfig

That will add two lines to the “.mozconfig” file that will be automatically created.

Finally, still in that top-level directory, begin compiling with the command:

make -f client.mk build

Checking Prerequisites

Checking Prerequisites

Depending on the Distribution of Linux, different things will be missing. For example, after beginning the prerequisite check, “make” spit back this:

Something is Missing

Something is Missing

I had to:

sudo apt-get install dbus-glib-1

to fix that, and then:

make -f client.mk build

again. If no additional problems are found, compiling will begin. This cannot be disturbed for the time that it is running. So do not close the terminal. It may take a few hours to compile.

After it has finished, and you are given control of the terminal again, you will want to run the new binary and see if it works. Close all instances of Firefox open, and then head to the top of the source directory. To run the new Firefox binary, and not the one from the repositories,

./dist/bin/firefox

Leave a comment

Filed under Computing, How-To

The Age of Firefox

Mozilla Firefox comes in a few different versions, depending on how new you want yours to be. There is:

Old-Hat Firefox – For people who do not like to upgrade their software. These are the versions that are years old. This stuff is OLD. Historical purposes only. Rising software security scientists might be interested in testing legacy exploits against this old browser. Because historical exploits are excellent sources to learn from.

Now-Firefox – What Mozilla says you should be using. People who update their systems when they should will be running this. Has the best stability of the gradient. If you want to browse the Internet and parse HTTP protocols and do all that normal stuff, this is where you should be.

Download here

New-Firefox – The stuff you read about in the technology publications. “Mozilla to release version Y.XX” and “New Firefox slated to be twice as slow and three times as memory hungry.” That sort of rot. Not a bad thing to use if you would like to help Firefox out. Download, install, and then run along. Be forewarned, it is new, so some extensions will not work and some websites will break.

Bloody-Edge-Firefox – For developers. This is that steaming pile of code that someone just dropped off minutes ago. No, really. This is updated every other minute and the people using this version are always compiling. Not for people who want to spend more time browsing than watching “make flags” fly by.

Leave a comment

Filed under Computing

Image Magick Preservation

Image Magick takes care of all my image converting needs. It is a wonderful tool for saving important images from the rot that happens when you move images around that are stored with a compression-minded format.

Ever notice that your .JPG files get all gritty after some time? I sure do not like that. So I prefer to save things in the .PNG format. While the image file-size becomes larger, the quality does not decrease overtime. A trade-off I am willing to pay in this age of external hard-drives and Internet storage.

You can usually find Image Magick in your Linux repositories. If you cannot, or you run Windows, you can pick up binaries on the website at:

http://www.imagemagick.org/

There is a laundry list of commands and functions this program suite has. An excellent tool to have around for bash-scripting jobs.

I use this command on my Linux box to preserve my important files. I pack them all together into one directory, and then enter this into the terminal:

mogrify -format png *

It converts all files in the directory to .PNG files. Make sure you only have image files in there.

Additional help can be found here:

http://www.imagemagick.org/script/command-line-tools.php

Leave a comment

Filed under Computing, How-To