This is me every morning.

October 26, 2007 at 08:58 PM | categories: cats, humor, videos | View Comments

Actually.. the cat is way closer to my face than in this video. Also, replace the bat with a full glass of water that I've stupidly left on the nightstand.

Read and Post Comments

Building Multi-TTY Emacs from CVS on Ubuntu Gutsy Gibbon

October 21, 2007 at 06:25 PM | categories: emacs, linux | View Comments

(Historical note May 2008: The build instructions below, while they should still work, are unnecessary as Multi-TTY has been merged into the main Emacs 23 branch and is available in ubuntu repositories: apt-get install emacs-snapshot)

Last spring I wrote an article about Multi-TTY Emacs. I had promised that I would update instructions for building it on Ubuntu, but since then I have been mainly using Gentoo on my laptop and never got around to updating it. Sorry :)

I switched to Ubuntu Gutsy Gibbon yesterday. I also got Multi-TTY Emacs running, and here's the video to prove it (If this is too small to see, download the original ogg theora version) :

Building CVS Emacs the old fashioned way

For those of you that want the easy way out, I've prebuilt an emacs CVS package that includes the Multi-TTY patch. I've tested that the package works on both Gutsy as well as Feisty.

For those of you that would like to learn how this is done, here's my recipe:

Install all the dependencies

sudo apt-get install build-essential cvs texinfo libx11-dev libxpm-dev libjpeg-dev \
libpng-dev libgif-dev libtiff-dev libgtk2.0-dev checkinstall

Check out the Emacs code from CVS

cvs -z3 co emacs

Compile the source

cd emacs
./configure --with-gtk --prefix=/usr/local
make bootstrap

Checkinstall will build a basic emacs package for us with a minimum of fuss. We don't want to automatically install this package though for reasons we'll see below

sudo checkinstall -D --install=no

Checkinstall will ask you to change some values. I changed the maintainer email and the version number.

Checkinstall is great, and works for 99% percent of the packages that I've tried it with. Emacs is a bit different though -- the package that checkinstall creates doesn't include everything that emacs requires, like all the .el files in the lisp folder among other things. So we have to edit the package a bit. For the following code, we'll assume the .deb file that checkinstall creates is just called "emacs_cvs-10202007-1_i386.deb", so adjust for whatever checkinstall called your .deb file:

Extract the data from the .deb

dpkg-deb -x emacs_cvs-10202007-1_i386.deb emacs_cvs-10202007-1_i386 
#Or whatever your .deb is called

Extract the control information from the .deb

dpkg-deb -e emacs_cvs-10202007-1_i386.deb emacs_cvs-10202007-1_i386/DEBIAN

Now we need to add some of the files that checkinstall left out of the package

cp -a lisp/* emacs_cvs-10202007-1_i386/usr/local/share/emacs/23.0.50/site-lisp/
mkdir emacs_cvs-10202007-1_i386/usr/local/share/emacs/23.0.50/lisp
mkdir -p emacs_cvs-10202007-1_i386/usr/local/libexec/emacs/23.0.50/i686-pc-linux-gnu
cp -a etc emacs_cvs-10202007-1_i386/usr/local/share/emacs/23.0.50/
mkdir emacs_cvs-10202007-1_i386/etc
ln -s ../usr/local/share/emacs/23.0.50/etc/termcap.src emacs_cvs-10202007-1_i386/etc/termcap

Rebuild the modified package

dpkg-deb -b emacs_cvs-10202007-1_i386 emacs_modified.deb

To totally revolutionize the way you use Emacs, remember to check out my earlier post on Multi-TTY Emacs.

Read and Post Comments

Mitt Romney is an unapologetic fearmonger

October 16, 2007 at 12:27 AM | categories: ron paul, mitt romney, liberty rants, videos | View Comments

I know a few people who want to vote for Mitt Romney because they believe he's very efficient and that every program he touches "turns to gold." But Mitt Romney is no panacea, in fact he's just like the rest of the neocons in Washington.

Last week, Governor Romney released one of the most horrifying campaign videos I've ever seen. Most political commercials are so diluted that they make just about anyone feel good. You know the ones I'm talking about -- the ones with the sounds of trumpet and dialog like "he's an honest man, caring, he has a plan that will increase jobs." When you make a video with such a supreme lack of substance, there's not a lot to disagree with. This is not that video:

[flv: 480 380]

This is the most blatant fear and war mongering video I've ever seen. Sure, the neocons have been making these points for years. But when have you ever seen them in such a recorded and rehearsed fashion?

There was a lot of information in such a short video, so let's take it point-by-point:

Violent, Radical, Islamic Fundamentalism is this "century's nightmare".

I won't deny that there are violent, radical groups (some of which are Islamic) that are menacing and terrorizing. But by no means do these groups hold a monopoly on this stigma. Even our own government supports these same philosophies when it suits their fancy. In a previous age, when the bad-guy-de-joeur wore a red star on his uniform, the U.S. funded Afghan mujahudeen guerrillas to fight against the USSR. This wasn't the U.S. simply coming to the aid of an ally; this was a provocation that started with the U.S. funding the mujahudeen a full six months prior to any USSR invasion of Afghanistan. We were in the Cold War with the USSR, and we saw the efforts of jihadists in Afghanistan as a means to an end. It was in the U.S.' interest to promote these jihadists then. What's so different today?

All throughout history, the U.S. (and a few other countries) have been far more violent and radical than any small terror cell.

Jihadists want a world-wide Khalifah

Update: My friend gandhi pointed out that I indeed heard the wrong word here. My apologies. The word Romney used was Caliphate not Khalifah. I'm not an expert on the etymology here, but I believe the two words are linked.

Nice big word there Mitt. I'm sure most of your future constituency understands what that means (ha!). When you say that word along with other mean sounding words it's easy to think it's derogatory without even knowing the definition of the word.

Basically, every single muslim is supposed to be a Khalifah, a representative / steward of god on this earth. A Khalifah is roughly the same as a missionary in the christian sense -- someone who upholds the principles of god and spreads his message. The Khalifah Institute does propose a plan to spread islamic principles throughout the world, they even go as far as to call for jihad. They specifically mention however, that "this is not to be a jihad of the sword, or of guns, bombs [nor] violence... that would be wrong."

Maybe Mitt is talking about some other Khalifah movement. However, for something so important as to require offensive wars I require my elected public servants to be specific. To simply say we need to fight Jihadist Khalifahs is not only insulting, but dangerous.

The U.S. is a country of Freedom Lovers

Oh, I wish this one were true. The truth of the matter is that this hasn't been the case for a very long time. If Americans love freedom, then it would follow that Americans would keep their government accountable to the very Constitution that incorporates it. If Americans were free, then they should be able to demonstrate the basic, timeless, qualities of free men and women.

Can you build on your land without a permit? Can you educate your own children without mandated curriculum and permit? Can you drive from one city to the next in a car without a permit? Can you acquire a gun without a permit (filling out the NICS is a permit!)? Can you marry the one you love without a permit? Can you die and have your body buried without a permit? Can you stay out of jail if you consume a prohibited substance? Can you stay out of jail if you tell your government that you will not fight their wars? Can you stay out of jail if you tell your government that you will not pay for something you find abhorrent? I submit to the casual observer of current events that every single facet of life in this country is subverted and has been made unfree.

Permits are permission. If you need permission you are not free. Taxes and the draft are involuntary, and equate to slavery.

Jihadists hate us for our freedoms

It's true that many jihadists (and Muslims in general) hate secularism and materialism. Did they destroy four planes and three buildings on 9/11 because of this? No. Blowback is real. The countries that have experienced terrorist bombings in the past decade are not arbitrary. They have been selected. All of these countries have had a military presence in the middle east. Switzerland has a strict non-interventionist policy and you don't see them being a target.

Republican Congressman Ron Paul has spoken very clearly about the issue of blowback. Listen to his calm, yet sobering words accompanied by this short PBS documentary confirming the reality of blowback:

Romney will increase Intelligence spending

Romney wants to increase funding of our intelligence agencies but he won't listen to them in the first place! The CIA has numerous times talked about the concept of blowback. After the Iran coup d'etat in 1953, the CIA produced a (now declassified) memo describing how blowback can be a massive consequence of what the CIA was trying to accomplish (a complete overthrow of an existing government) warning CIA operatives that "few, if any, operations are as explosive as this type."

Romney will increase military personnel by at least 100,000

The U.S. has over 1.5 Million troops deployed worldwide. We have the strongest military presence of any country in all of history. We are Pax-Americana -- a bona-fide Empire. 70% of Americans want out of Iraq. We need to support our troops by bringing them home!

Romney will monitor all telephone calls

Romney says he wants to monitor all calls Al-Qaeda makes coming into America. I say he wants to monitor all calls whatsoever. If his source of information on Al-Qaeda is coming from monitoring telephones, how can he know where Al-Qaeda is calling from before he listens to them? It's the classic chicken or the egg problem. If you want to listen to all calls Al-Qaeda is making, you have to listen to all the calls. If you know where Al-Qaeda is calling from, then what the hell are you doing sitting on your ass listening to their phone calls?

This isn't about listening to Al-Qaeda at all. This is about increasing control.

Romney will make sure the U.S. stops Iran from acquiring Nuclear weapons

Gah. At least he's forthcoming about it this time. Last week he said he'd have to consult his lawyers to see if pretty please, maybe, possibly, he could bomb the shit out of them without having to ask Congress for permission. Romney, real patriots protect the Constitution!

Even if Iran had the capability, let alone the desire, to build nuclear weapons (I doubt they do), what's the difference between Iran having nuclear weapons and the 10 or so other countries that have them? What is intrinsically wrong with having nuclear weapons? Whatever that answer is, it should be applied equally to us as well as to them.

Ron Paul is the only moral choice

The people that believe in Romney's War on Jihadists would call Dr. Ron Paul an isolationist and that this makes him somehow irresponsible. This is so very wrong on many accounts. First of all, Dr. Paul is in no way an isolationist. Is it an isolationist view to think that we should not fuck with the rest of the world by establishing military coups around the world, displacing legally and democratically elected leaders? Is it an isolationist perspective to think that we should be cultivating friends throughout the world by trading and having open dialog with them instead of provoking war by subverting their governments? How would Americans feel if another country were to do the same here? Wouldn't we too feel a little retaliatory? War is avoidable, because blowback is avoidable: just mind your own business and make friends in the process.

Ron Paul is your only moral choice for a conservative president, no matter if you're anti-war or even if you believe in "Just War" theory. Mitt Romney's war theory, just as any modern neoconservative, is fear-based. It lacks any historical perspective and is entirely unjust.

Read and Post Comments

Recovering an Ncftp password

October 15, 2007 at 02:25 PM | categories: python, linux | View Comments

A coworker today asked me for the password to an FTP account we use. I didn't have any idea what it was because I just have it stored in an ncftp bookmark. I looked in my ~/.ncftp/bookmarks file and sure enough it was in there but it was encoded.

For future reference, I just wanted to document here that the password is simply base64 encoded. So it's pretty easy to decode using a bit of python:

>>> import base64
>>> base64.decodestring("TheEncodedPassword")
Read and Post Comments

Jungle Disk, Linux, and Mono

October 03, 2007 at 05:17 PM | categories: linux | View Comments

Jungle Disk is a really neat application that allows you to store/backup files online using the Amazon S3 storage service. Basically it is a really inexpensive, fast and efficient way to save important files and access them from anywhere. On top of all that, it runs on just about every platform I would ever use: Linux, Mac OS X, and Windows. (In no order of preference, oh wait... )

If you're not much into computer science, that's pretty much all you need to know. If you are though, keep reading. :)

Jungle Disk is not open source. This would normally raise a huge dilemma for me. Without it being open source, how can I be absolutely sure that I will be able to retrieve my data in the future? The software could have a lockout feature of some kind hidden inside the application that would prevent me from getting my data. I refuse to be held hostage by stupid software!

(By no means am I an open source zealot purist that only uses free software. I use a few high quality closed source, commercial applications (VMWare workstation comes to mind) I just think that open source software tends to be of much higher quality and is able to mature a lot faster than your typical closed source variety. I also detest software patents.)

Jungle Disk is a bit different, even though it's closed source, they have released a portion of their code under the GPL: the decoding/retrieval code. What this proves is that your data can be retrieved without any dependence on closed source, secretive, software.

But I still don't want to take their word for it. So I set out to compile the code and try it myself. The code is written for Visual Studio (which only runs on windows), but that's not so much of a problem because the Mono project has brought most of the .NET framework to Linux.

Here's how to compile the Jungle disk retrieval code on Linux using Mono:

Install the latest version of Mono (I used 1.2.4. didn't have all of the functionality I needed).

Download and extract the source code:

mkdir jds
cd jds

Compile the code:

gmcs *.cs -r:System.Web -out:jungle_example.exe

Cool! It compiled without warnings nor errors.

Now try running it:

mono jungle_example.exe Your_S3_ID Your_S3_Key listbuckets

Error executing command: Error getting response stream (Trust failure): TrustFailure
System.Net.WebException: Error getting response stream (Trust failure): TrustFailure ---> System.Net.WebException: Error getting response stream (Trust failure): TrustFailure ---> System.IO.IOException: The authentication or decryption has failed. ---> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server.

Ouch, we're not accepting the certificate for whatever reason. I don't know much about CSharp at all, but I found a page on the Mono project site that explains the problem and possible solutions. I applied the dumbest of all the possible solutions, which is to ignore the certificate trust issue altogether -- caveat emptor. Here's my patch.

Apply the patch and recompile

wget -O - | patch -p1
gmcs *.cs -r:System.Web -out:jungle_example.exe

Try running again:

mono jungle_example.exe Your_S3_ID Your_S3_Key listbuckets

If it lists your buckets, it worked!

You can also list files in the directory like so:

mono jungle_example.exe Your_S3_ID Your_S3_Key dir default /
mono jungle_example.exe Your_S3_ID Your_S3_Key dir default /pictures
mono jungle_example.exe Your_S3_ID Your_S3_Key dir default /music

You can retrieve your files like so:

mono jungle_example.exe ID Key getfile default "/Some"
Read and Post Comments

Next Page »