A page for randomness

July 18, 2008

Secure remote access using public/private keys

In the context of digital security, a key is a piece of data which is used to encrypt or decrypt other pieces of data. The public and private key scheme is interesting because data encrypted with a public key can only be decrypted with the associated private key. You may freely distribute a public key so that others can encrypt the messages they send you. One of the reasons that public/private key schemes have revolutionized digital security is because the sender and receiver don’t have to share a common password. Among other things, public/private key cryptography has made e-commerce and other secure transactions possible. In this article, we’ll create and use public and private keys to create a highly secure distributed backup solution.

Each machine involved in the backup process must be running the OpenSSH secure shell service (sshd) with port 22 accessible through any intermediate firewall. If you access remote servers, then there is a good chance you’re already using secure shell.

Our goal will be to provide machines with secure access without requiring the need to manually provide passwords. Some people think that the easiest way to do this is to set up password-less access: do not do this. It is not secure. Instead, the approach we’ll use in this article will take perhaps an hour of your time, set up a system which gives all the convenience of “passphraseless” accounts — but is recognized as being highly secure.

Read more: Automate backups on Linux

July 14, 2008

Robocars on Discovery Science Channel to feature autonomous vehicles from DARPA Urban Challenge, including Team CajunBot.

The series “Robocars” will be premiering tonight at 9pm (Central time) on the Discovery Science Channel.  The show follows ten teams of top engineers from around the U.S. compete for a $2 million grand prize, struggling to build the first vehicle to drive itself through an urban environment and features Team CajunBot.

Here is the schedule and episode descriptions:

July 14th 9-10pm - Episode 1 - follows Stanford Racing, Tartan Racing, Team Jefferson, Team Gray and The Golem Group as they prepare for the Urban Challenge and pass through the DARPA site visits.

July 21st 9-10pm - Episode 2 - follows Highlander Racing, Team Oshkosh, Team Cajunbot, Team MIT, and Team Case as they prepare for the Urban Challenge and pass through the DARPA site visits.  The show ends with DARPA announcing the teams who made it to the semi-finals.

July 28th 9-10pm - Episode 3 - covers the semi-finals.  Stanford Racing, Tartan Racing, Team Jefferson, Team Gray, The Golem Group, Team Oshkosh, Team Cajunbot, Team MIT and Team Case are all included.  The show ends with DARPA announcing the teams who made it to the finals.

August 4th 9-10pm - Epiosde 4 - covers the finals.  Stanford Racing, Tartan Racing, Team MIT, and Team Oshkosh are all included.

August 11th  8-10pm - Episodes 5 and 6 - The first hour is a summary of the last four episodes and the second hour focuses on futuristic car technology and contains excerpt from the DARPA Urban Challenge.

Read more: Welcome to the CajunBot Lab website.

July 11, 2008

New Radiohead Video is Shot with Lasers, Not Cameras.

Filed under: computers and technology, darpa uc 2007, geek, interesting, news, personal — Mark @ 11:35 am

I’m sure y’all remember the expensive ice cream buckets on top of several DARPA Urban Challenge vehicles…

Radiohead, never ones to shy away from trying new things, has shot its new video for “House of Cards” without using cameras at all. Whaa? Yes, they’ve used two fancy new technologies called Geometric Informatics and Velodyne Lidar.

Read more: New Radiohead Video is Shot with Lasers, Not Cameras.

Weird sound problem on Macbook running Linux

If you’re running linux on a macbook and you have fuzzy or static like sound especially out of the left channel, whether on speakers or headphones, then this tip from the Ubuntu forums will most likely help. The following was done on my Ubuntu machine, but mostly can be applied with little effort on another distribution like Fedora:

$ sudo emacs /etc/modprobe.d/options

Add the following line to the end of the file:

options snd-hda-intel model=[MODEL_BELOW] position_fix=2 probe_mask=1

Where [MODEL_BELOW] is one of the following:

intel-mac-v1   : Intel Mac Type 1
intel-mac-v2   : Intel Mac Type 2
intel-mac-v3   : Intel Mac Type 3
intel-mac-v4   : Intel Mac Type 4
intel-mac-v5   : Intel Mac Type 5
macmini        : Intel Mac Mini (equivalent with type 3)
macbook        : Intel Mac Book (eq. type 5)
macbook-pro-v1 : Intel Mac Book Pro 1st generation (eq. type 3)
macbook-pro    : Intel Mac Book Pro 2nd generation (eq. type 3)
imac-intel     : Intel iMac (eq. type 2)
imac-intel-20  : Intel iMac (newer version) (eq. type 3)

You’ll also need to update your initramfs:

$ sudo update-initramfs -u

Reboot and see if the sound works. Typically the sound will stop working altogether or work perfectly. If it doesn’t work, try changing the model. I have a 2nd or 3rd generation macbook (I can’t remember which), but I needed to use the model=intel-mac-v3 for it to work. Check out the help article for more information.

July 10, 2008

Betrayed by Obama

Filed under: frauds, interesting, news, personal, political, quotes — Mark @ 4:10 pm

What an interesting week: I came back from vacation to find the two presumptive presidential nominees running away from their bases. Suddenly John McCain is evading, not embracing, the media, limiting access and getting testy with the very people whose formerly friendly coverage made him a popular “maverick.” Meanwhile, Barack Obama is complaining that his “friends on the left” just don’t understand him — he’s not moving to the center, he is “no doubt” a progressive, just one who now supports the scandalous FISA “compromise” and Antonin Scalia’s views on gun rights and the death penalty, no longer plans to accept public campaign funding, and wants to make sure women aren’t feigning mental distress to get a “partial-birth” abortion (the right’s despicable term of choice; the correct phrase is either late-term or third-trimester abortion).

I actually have some sympathy for Obama. He was never the great progressive savior that his fans either thought he was, or peddled to their readers. While Arianna Huffington and Markos Moulitsas and Tom Hayden were hyping him as the progressive alternative to Hillary Clinton, Obama was getting away with backing a healthcare bill less progressive than Clinton’s, adopting GOP talking points on the Social Security “crisis” and double-talking on NAFTA. So why shouldn’t he think his “friends on the left” will put up with his abandoning other progressive causes?

I’ve admired Obama, but I never confused him with a genuine progressive leader. Today I don’t admire him at all. His collapse on FISA is unforgivable. The only thing Obama has going for him this week is that McCain is matching him misstep for misstep. While we’re railing about Obama’s craven vote on FISA — rightfully; Glenn Greenwald is a hero for his work on this topic — McCain was outdoing Dick Cheney with neocon crazy talk, warning that Iran’s test of nine old missiles we already knew they had increases the chances of a “second Holocaust.” Every time I wonder whether I can ultimately vote for Obama in November, given all of his political cave-ins, McCain does something new to make sure I have to.

“This Administration has put forward a false choice between the liberties we cherish and the security we demand. When I am president, there will be no more illegal wire-tapping of American citizens; no more national security letters to spy on citizens who are not suspected of a crime; no more tracking citizens who do nothing more than protest a misguided war. Our Constitution works, and so does the FISA court.”

Too bad Obama doesn’t believe that anymore.

Read more: Betrayed by Obama - Joan Walsh - Salon.com

June 15, 2008

Keith Olbermann provides “context” to McCain’s comments

Filed under: interesting, news, personal, political — Mark @ 8:56 am

June 12, 2008

Prompt for password witout echoing chars in bash

Filed under: geek, linux, unix, and open source, personal, programming — Mark @ 3:36 pm

echo -n “username: ”
read username
echo -n “Password: ”
stty -echo
read password
stty echo

source: Mind Download: prompt for password w/o echoing chars in bash

BASH: Check if a string contains only digits

Filed under: linux, unix, and open source, personal, programming — Tags: — Mark @ 3:35 pm

if [ -n "`echo \"$1\" | grep \"^[0-9]*$\”`” ] ; then

echo “It is a number”

else

echo “It is not a number”

fi

June 10, 2008

Feminists, the choice is obvious

Filed under: personal, political — Mark @ 9:09 am

I support Barack Obama for president. It’s OK that you have supported Hillary Clinton. I get it, I really do. What I don’t get, can’t get, is seeing some of you riled up Clinton supporters threatening to vote for McCain.

Let me get this straight; you consider yourself a Democrat and a feminist. Yet rather than vote for a man who supports a woman’s right to choose, children’s healthcare, and an end to the war in Iraq, you would vote for a man who voted against all of these things.

You would vote for a man who is promising to nominate far-right activists for the Supreme Court, a man who votes consistently against choice, affirmative action, and workers’ rights.

You would vote for a man who supports President Bush on most major issues vs. a man whose positions are quite similar to Clinton’s.

Read more: Feminists, the choice is obvious - The Boston Globe

May 26, 2008

Managing Services in Ubuntu, Part II: Managing Runlevels

In my last post, sendmail was one of the services on my box that was starting when I enter runlevel 2. Maybe I don’t want sendmail to start, or rather, if it is already started, when I enter runlevel 2, I want to kill it. In other words, I don’t want it running for runlevel 2. How can I make this change?

Well, first, I could just delete the soft link from the runlevel directory /etc/rc2.d/:

aaron@kratos:~ 1355 % sudo rm /etc/rc2.d/S21sendmail
Password:

That would definitely keep it from starting when I enter runlevel 2, but what if I wanted to kill it if it was already started from a previous runlevel? Just deleting the soft link won’t do it. I need to turn it into a K-script. Further, deleting and creating soft links in my /etc/rc[0-6].d/ directories by hand is a bit of a pain. This is where the update-rc.d command comes in:

aaron@kratos:~ 1356 % sudo update-rc.d -f sendmail remove
Password:
Removing any system startup links for /etc/init.d/sendmail …
/etc/rc0.d/K19sendmail
/etc/rc1.d/K19sendmail
/etc/rc2.d/S21sendmail
/etc/rc3.d/S21sendmail
/etc/rc4.d/S21sendmail
/etc/rc5.d/S21sendmail
/etc/rc6.d/K19sendmail
aaron@kratos:~ 1357 % sudo update-rc.d sendmail stop 20 0 1 2 3 4 5 6 .
Adding system startup for /etc/init.d/sendmail …
/etc/rc0.d/K20sendmail -> ../init.d/sendmail
/etc/rc1.d/K20sendmail -> ../init.d/sendmail
/etc/rc2.d/K20sendmail -> ../init.d/sendmail
/etc/rc3.d/K20sendmail -> ../init.d/sendmail
/etc/rc4.d/K20sendmail -> ../init.d/sendmail
/etc/rc5.d/K20sendmail -> ../init.d/sendmail
/etc/rc6.d/K20sendmail -> ../init.d/sendmail

We’ll get into the syntax a bit later, but these commands, as observed, removed any existing soft links that previously existed, and created new K-scripts for all of my runlevels.

First off, why two separate commands? Well, by Debian policy, no package upgrade will ever overwrite a previous configuration. This includes updating soft links in the runlevel directories. This also ensures persistent changes and allows the system administrator to prevent daemons from launching. So, if soft links already exist, they first need to be removed, then new links created.

Source: Aaron Toponce : Managing Services in Ubuntu, Part II: Managing Runlevels

April 21, 2008

Where did the .Trash folder go?

Filed under: linux, unix, and open source, personal — Mark @ 8:29 am

After a recent upgrade to the newest freedesktop.org specification, you might be wondering where your ~/.Trash folder went. Well you can check out http://www.ramendik.ru/docs/trashspec.html or know that it is now located in

~/.local/share/Trash

between the folders ‘files’ and ‘info’.

April 20, 2008

Getting two finger right click in Ubuntu for a MacBook

The following options need to be added to your xorg.conf file under the synaptics input device:

Option “TapButton1″ “1″

Option “TapButton2″ “3″

Option “TapButton3″ “2″

See: MacBook - Community Ubuntu Documentation

April 19, 2008

Dash as /bin/sh

Dash as /bin/sh

In Ubuntu 6.10, the default system shell, /bin/sh, was changed to dash (the Debian Almquist Shell); previously it had been bash (the GNU Bourne-Again Shell). The same change will affect users of Ubuntu 6.06 LTS upgrading directly to Ubuntu 8.04 LTS. This document explains this change and what you should do if you encounter problems.

Why was this change made?

The major reason to switch the default shell was efficiency. bash is an excellent full-featured shell appropriate for interactive use; indeed, it is still the default login shell. However, it is rather large and slow to start up and operate by comparison with dash. A large number of shell instances are started as part of the Ubuntu boot process. Rather than change each of them individually to run explicitly under /bin/dash, a change which would require significant ongoing maintenance and which would be liable to regress if not paid close attention, the Ubuntu core development team felt that it was best simply to change the default shell. The boot speed improvements in Ubuntu 6.10 were often incorrectly attributed to [WWW] Upstart, which is a fine platform for future development of the init system but in Ubuntu 6.10 was primarily running in System V compatibility mode with only small behavioural changes. These improvements were in fact largely due to the changed /bin/sh.

The Debian policy manual has long mandated that “shell scripts specifying ‘/bin/sh’ as interpreter must only use POSIX features”; in fact, this requirement has been in place since well before the inception of the Ubuntu project. Furthermore, any shell scripts that expected to be portable to other Unix systems, such as the BSDs or Solaris, already honoured this requirement. Thus, we felt that the compatibility impact of this change would be minimal.

Of course, there have been a certain number of shell scripts written specifically for Linux systems, some of which incorrectly stated that they could run with /bin/sh when in fact they required /bin/bash, and these scripts will have broken due to this change. We regret this breakage, but feel that the proper way to address it is to make the small changes required to those scripts, discussed later in this document. In the longer term, this will promote a cleaner and more efficient system.

(This applies the same philosophy as in C and C . Programs should be written to the standard, and if they use extensions they should declare them; that way it is clear what extensions are in use and they will at least fail with a much better error message if those extensions are not available.)

Read more: DashAsBinSh - Ubuntu Wiki

March 21, 2008

Is This President F*cking Crazy? Or Is He Finally Being Truthful?

Filed under: news, personal, political — Mark @ 7:55 am
“War critics can no longer credibly argue that we are losing in Iraq, so now they argue the war costs too much.” President Bush March 19, 2008

Read that again. Hes saying it today, the fifth anniversary of a war that in his own words means we were losing four out of those five years.

“War critics can no longer credibly argue that we are losing in Iraq…”

He now admits that those who questioned what he and his cronies had been touting for at least the first four years - that things in Iraq were going swimmingly - were right. Those who talk show Lords of Loud had called Defeatocrats and underminers of the military were, in fact, “credible.”

WE WERE LOSING.

The President says so…now

For those who, like Bill OReilly, who ask for proof that the President had lied, now have it. From his own mouth.

For the first four years, he was LYING.

Read more: Steve Young: Is This President Fcking Crazy? Or Is He Finally Being Truthful? - Politics on The Huffington Post

March 16, 2008

Fox Attacks! - Obama

Filed under: news, personal, political, youtube — Mark @ 1:46 pm

Fox Attacks! - Obama (part II)

Fox Attacks! - Obama

March 15, 2008

Fans await return of Star Wars

Filed under: geek, interesting, news, personal — Mark @ 12:14 pm
Lucas offered a glimpse into the latest creation in his sci-fi universe at the theater-owners convention ShoWest on Thursday, showing a sequence from “Star Wars: The Clone Wars,” a computer-animated movie due in theaters August 15. It will be followed by a TV series of the same name, to air on the Cartoon Network and TNT this fall.

The movie came about as an afterthought while Lucas was developing an animated TV show of the same name. That show debuts this fall, but Lucas figured it was ripe for big-screen treatment, too.

“You’ve got the whole assembly line built, and then you say, ‘Hey, we can make up something,”‘ Lucas said in an interview. “It was like old-time movie making. What I love about television, it’s like Monogram Pictures or the old studio system, where a couple guys come to work and they sit and have some coffee and go, ‘Why don’t we make a movie about such and such? OK, fine.’ And at the end of the day, it’s pretty much on its way.”

Set in the years between episodes II and III — “Attack of the Clones” and “Revenge of the Sith” — of the big-screen “Star Wars” chronicle, the movie and series present fresh adventures of Jedi warrior Anakin Skywalker, his mentor, Obi-Wan Kenobi, and other colleagues.

The movie introduces a female Jedi, Ahsoki, who is Anakin’s young apprentice.

“It’s like ‘Band of Brothers’ in space, with Jedi,” Lucas, 63, said. “You can tell lots of stories. They come up all the time.”

Lucas said he plans to produce at least 100 hours worth of TV episodes of “Clone Wars.”

He also is moving forward with a live-action “Star Wars” TV show focusing largely on new characters removed from the Skywalker family. That show will be set in the decades between “Revenge of the Sith” and the period when the original film, 1977’s “Star Wars,” takes place.

So can fans ever get enough of “Star Wars”?

“I don’t know,” Lucas said. “I’m thankful every year that it keeps going.”

Source: Fans await return of Star Wars - CNN.com

March 13, 2008

Obama Campaign Skewers Clinton E-mail Statement

Filed under: funny, news, personal, political — Mark @ 2:59 pm
Wednesday morning, the Clinton campaign sent reporters and bloggers covering the campaign a statement that consisted of questions and comments under the title of “Keystone Test: Obama Losing Ground.”The Obama campaign’s communications department decided to annotate those questions and comments with some comments of their own… and boy, they held nothing back.

Below you’ll find the annotated e-mail that has been making the rounds of the media. The Obama campaign’s comments are in bold.

To: Interested Parties
From: Clinton Campaign
Date: Wednesday, March 12, 2008
Re: Keystone Test: Obama Losing Ground
[Get ready for a good one.]
The path to 1600 Pennsylvania Avenue goes through Pennsylvania so if Barack Obama can’t win there, how will he win the general election?

[Answer: I suppose by holding obviously Democratic states like California and New York, and beating McCain in swing states like Colorado, Iowa, Minnesota, Missouri, Virginia and Wisconsin where Clinton lost to Obama by mostly crushing margins. But good question.]

After setbacks in Ohio and Texas, Barack Obama needs to demonstrate that he can win the state of Pennsylvania. Pennsylvania is the last state with more than 15 electoral votes on the primary calendar and Barack Obama has lost six of the seven other largest states so far — every state except his home state of Illinois.

[If you define "setback" as netting enough delegates out of our 20-plus-point wins in Mississippi and Wyoming to completely erase any delegate advantage the Clinton campaign earned out of March 4th, then yeah, we feel pretty setback.]

Pennsylvania is of particular importance, along with Ohio, Florida and Michigan, because it is dominated by the swing voters who are critical to a Democratic victory in November. No Democrat has won the presidency without winning Pennsylvania since 1948. And no candidate has won the Democratic nomination without winning Pennsylvania since 1972.

[What the Clinton campaign secretly means: PAY NO ATTENTION TO THE FACT THAT WE'VE LOST 14 OF THE LAST 17 CONTESTS AND SAID THAT MICHIGAN AND FLORIDA WOULDN'T COUNT FOR ANYTHING. Also, we're still trying to wrap our minds around the amazing coincidence that the only "important" states in the nominating process are the ones that Clinton won.]

But the Obama campaign has just announced that it is turning its attention away from Pennsylvania.

[Huh?]

This is not a strategy that can beat John McCain in November.

[I don't think Clinton's strategy of losing in state after state after promising more of the same politics is working all that well either.]

In the last two weeks, Barack Obama has lost ground among men, women, Democrats, independents and Republicans — all of which point to a candidacy past its prime.

["A candidacy past its prime." These guys kill me.]

For example, just a few weeks ago, Barack Obama won 68% of men in Virginia, 67% in Wisconsin and 62% in Maryland. He won 60% of Virginia women and 55% of Maryland women. He won 62% of independents in Maryland, 64% in Wisconsin and 69% in Virginia. Obama won 59% of Democrats in Maryland, 53% in Wisconsin and 62% in Virginia. And among Republicans, Obama won 72% in both Virginia and Wisconsin.

But now Obama’s support has dropped among all these groups.

[That's true, if you don't count all the winning we've been up to. As it turns out, it's difficult to maintain 40-point demographic advantages, even over Clinton]

In Mississippi, he won only 25% of Republicans and barely half of independents. In Ohio, he won only 48% of men, 41% of women and 42% of Democrats. In Texas, he won only 49% of independents and 46% of Democrats. And in Rhode Island, Obama won just 33% of women and 37% of Democrats.

[I'm sympathetic to their attempt to parse crushing defeats. And I'm sure Rush Limbaugh's full-throated endorsement of Clinton didn't make any difference. Right]

Why are so many voters turning away from Barack Obama in state after state?

[You mean besides the fact that we're ahead in votes, states won and delegates?]

In the last few weeks, questions have arisen about Obama’s readiness to be president. In Virginia, 56% of Democratic primary voters said Obama was most qualified to be commander-in-chief. That number fell to 37% in Ohio, 35% in Rhode Island and 39% in Texas.

[Only the Clinton campaign could cherry pick states like this. But in contrast to their logic, in the most recent contest of Mississippi, voters said that Obama was more qualified to be commander in chief than Clinton by a margin of 55-42.]

So the late deciders — those making up their minds in the last days before the election — have been shifting to Hillary Clinton. Among those who made their decision in the last three days, Obama won 55% in Virginia and 53% in Wisconsin, but only 43% in Mississippi, 40% in Ohio, 39% in Texas and 37% in Rhode Island.

[If only there were enough late deciders for the Clinton campaign to actually be ahead, they would really be on to something.]

If Barack Obama cannot reverse his downward spiral with a big win in Pennsylvania, he cannot possibly be competitive against John McCain in November.

[If they are defining downward spiral as a series of events in which the Clinton campaign has lost more votes, lost more contests and lost more delegates to us ... I guess we will have to suffer this horribly painful slide all the way to the nomination and then on to the White House.]

[Thanks for the laughs guys. This was great.]

Source: NPR: Obama Campaign Skewers Clinton E-mail Statement
See also: Clinton Memo on Pennsylvania

March 11, 2008

Oklahoma: One Step from Doom

Filed under: personal, political, religious, science — Mark @ 6:10 am
For a long time, I have been disquieted by the fact that many people want to give patently ridiculous ideas as much standing as reality. One problem with this is that once you open the door to fantasy, any and all flavors of it can walk on through, as in the example above. But it also elevates fantasy to the same level as reality, and that is simply wrong.

I taught a few classes back when I was a grad student. If someone had answered a question on a test saying the Earth was 6000 years old, I would have marked it as incorrect. That’s because — and sit down for this breaking news — that answer is wrong. The student could complain, they could take it to the dean, the president, the Supreme Court for all I care — I wouldn’t have backed down. Wrong is wrong.

I don’t care what your religious belief is, there are some things that are simple facts. An object with mass has gravity. A lump of lithium dropped into water will create heat and hydrogen gas. An accelerating charged particle will emit radiation. These are facts. It doesn’t matter what you believe: reality is that which, when you go to sleep, doesn’t go away.

What I find most ironic about this legislation — and there is a rich, rich field of irony to choose from — is that it was passed by conservatives, people who no doubt would rail against political correctness and relativism (for example, the bill’s primary author, Sally Kern, has spoken clearly about her being against “the gay lifestyle” — she even compares being gay to cancer), yet this is exactly what this legislation is all about. The problem here is that they are trying to legislate relativistic reality. And that’s simply wrong.

Read more: Bad Astronomy Blog » Oklahoma: One Step from Doom

March 9, 2008

Why did I spend so long on my Sleeping Barber OS project?

Filed under: personal, programming, undergrad computer science classes — Mark @ 11:08 am

Thank you for asking!

(11:55:10 AM) Mark: damnit
(11:55:14 AM) Mark: I hate lee
(11:59:35 AM) GK: why?
(12:00:12 PM) Mark: remember how I told you that I wrote the code for sleeping barber…then I had to go back and rewrite it?
(12:00:25 PM) Mark: it is his fault…because of his bad english/typing skills
(12:01:00 PM) Mark: This last sentence on the description of the problem, changes it…(codewise)
(12:01:07 PM) Mark: Here is how the sentence reads:
(12:01:12 PM) Mark: “If the barber is asleep, the customer waits the barber.”
(12:01:34 PM) Mark: it is obviously incorrect, so the way I initially interpreted was:
(12:01:45 PM) Mark: If the barber is asleep, the customer waits for the barber. (to wake up)
(12:02:03 PM) Mark: however, he actually meant:

If the barber is asleep, the customer wakes the barber.

March 5, 2008

Did Clinton do as well as everything thinks she did?

Filed under: interesting, news, personal, political — Mark @ 2:34 pm

From David Plouffe, Obama mailing list:

Our projections show the most likely outcome of yesterday’s elections will be that Hillary Clinton gained 187 delegates, and we gained 183.

That’s a net gain of 4 delegates out of more than 370 delegates available from all the states that voted.

For comparison, that’s less than half our net gain of 9 delegates from the District of Columbia alone. It’s also less than our net gain of 8 from Nebraska, or 12 from Washington State. And it’s considerably less than our net gain of 33 delegates from Georgia.

The task for the Clinton campaign yesterday was clear. In order to have a plausible path to the nomination, they needed to score huge delegate victories and cut into our lead.

They failed.

Hmm..

March 2, 2008

It brings back memories

Filed under: computers and technology, geek, personal — Mark @ 11:28 am

Woke up this morning and of course, the laptop had disconnected from the wireless network. I did the usual suspend->wake maneuver and did a browse on the available wireless networks. To my surprise was a new one, “Motorola”. Fresh meat. I go to the router’s login page, and try the standard “admin”/”admin” combo, and other variants. After a little searching around I manage to log in with “admin”/”motorola”….big surprise there. Reminds me of good ol “Athrey” before it was WEP-ed. I changed the default login password to “apple” out of not knowing what else to put. Maybe I can use this network to get some seeding of torrents done.

February 29, 2008

I’m not that dumb..

Filed under: funny, personal, quotes — Mark @ 3:08 pm

We’ve all said it: “I’m not that dumb, but…”

Well, I don’t think you’ve said this:

I’m not that dumb that a dumb person can read my dumb mind.

- Suresh

February 26, 2008

New National Polls: Obama gaining ground

Filed under: news, personal, political — Mark @ 8:58 pm

Hot Damn. Obama for the win!

Two new national polls show Barack Obama surging against Hillary Clinton in the race for the Democratic presidential nomination.

In a New York Times-CBS News poll, 54 percent of Democratic primary voters say they would prefer the party to nominate Barack Obama while 38 percent prefer Hillary Clinton. That is a sharp shift in Obama’s favor from the previous poll in late January, when voters were split evenly, 41 percent each for Obama and Clinton.

The poll found similar swings in Obama’s favor on other questions. For example, asked how they would vote if the race were between Obama and Republican John McCain, 50 percent said they would support Obama to 38 percent for McCain, while respondents were split evenly, at 46 percent each, when the choice was between McCain and Clinton. Obama gained ground within nearly every sector, the poll found.

In a new Associated Press-Ipsos poll, Obama leads Clinton by a narrow margin, 46 percent to 43 percent, whereas Clinton had had a 5-point lead among Democratic primary voters in early February. Obama achieved that swing by advancing on Clinton in several demographic sectors, including white men, liberals and middle-income earners, the AP reported.

The AP poll had a margin of error of plus or minus 3.1 percentage points, and the Times poll 3 percentage points. Those margins increased to about 5 percentage points when questions were asked of Democrats or Republicans only.

Source: New National Polls: Obama gaining ground - 2008 Presidential Campaign Blog - Political Intelligence - Boston.com

Remember when?

“Remember when I grabbed your resources at the beginning of class?”

“…and then I returned them.”

- Dr. Lee

February 23, 2008

Compiling java to native code.

I recently got a wild hair and was wondering if I could compile java to native code. I stumbled across an article about a GNU project called GCJ. I downloaded the compiler and did a “Hello World” for java native code. It worked! Then I set out to make a makefile for compiling java to native code.

The following screenshot shows the results:

Java in native code Screenshot

(click to enlarge)

And here is the makefile to compile to native code:

# Created by Mark McKelvy (2008)

# Makefile for .java sources, will compile to native code, creating
# intermediate .o files. Will automatically search which source files
# have main() and link the objects into the appropriate binary.

CC=gcj
CFLAGS=-c -g
CHMOD=chmod 755
SOURCES = $(wildcard *.java)
OBJECTS = $(SOURCES:.java=.o)
BINS = $(shell grep -r “public static void main” $(SOURCES) | awk ‘BEGIN{FS=”.java”;ORS=” “}{print $$1}’)

.SUFFIXES: .java .o
default: objects binaries

binaries:
	@for bin in $(BINS); do \
		echo Linking $$bin ; \
		$(CC) –main=$$bin -o $$bin $(OBJECTS) ; \
	done

objects: $(OBJECTS)

.java.o:
	@echo Compiling $*.java ; \
	$(CC) $(CFLAGS) -O $*.java

RMFILES	+=$(wildcard *~)
RMFILES	+=$(wildcard *.o)
RMFILES +=$(BINS)

clean:
	@$(RM) $(RMFILES) ; \
	if [ "$(RMFILES)" != " " ] ; then \
		echo $(RM) $(RMFILES) ; \
	fi

 

Convert FLV to MPG and MP3

Use ffmpeg to convert flv to mpg:

ffmpeg -i old-file.flv new-file.mpg

Use mplayer to copy mp3 from flv

mplayer -dumpaudio old-file.flv -dumpfile new-file.mp3

Script to speed things up:

(more…)

If Obama Went 0-for-10

Filed under: funny, interesting, personal, political — Mark @ 10:11 am

By Eugene Robinson
Friday, February 22, 2008; Page A23

Humor me while we conduct a little thought experiment. Imagine that Barack Obama had lost 10 contests in a row. Imagine that he now trailed Hillary Clinton substantially in the number of Democratic primaries and caucuses won, in total votes cast, in pledged convention delegates, in the overall delegate count, in fundraising and in the ineffable attribute called mojo. Imagine that Obama was struggling, at this late hour, to come up with the right message. What would the conventional wisdom say?

That it was over, of course. That Obama was toast. That staking everything on the March 4 primaries in Ohio and Texas was a starry-eyed hope, not a plan, and that it was time to smell the coffee.

Whenever Obama faced reporters, he’d have to answer tough questions. Why was he carrying on, knowing that he’d have to win by unrealistically large margins in all the remaining states to catch up? Didn’t it worry him that relying on the superdelegates — the Democratic establishment, basically — to hand him the nomination could divide and weaken the party? Wasn’t he concerned that Republican John McCain has such a head start in unifying his party and plotting his general election campaign?

The above, you will have noticed, is an accurate description of where Clinton stands right now. Yet nobody is forcing her to respond publicly to those painful questions. The reason is obvious: She’s Hillary Clinton, and history suggests it’s foolish to count out a Clinton until the last dog dies.

Read more: Eugene Robinson - If Obama Went 0-for-10 . . . - washingtonpost.com

February 22, 2008

Why does faith deserve respect?

Filed under: interesting, personal, religious, youtube — Mark @ 5:57 pm

It doesn’t.

Video by Pat Condell:

God bless atheism

Filed under: interesting, personal, religious, youtube — Mark @ 5:51 pm

Video by Pat Condell:

Stuck on stupid?

Filed under: personal, political, quotes — Mark @ 5:31 pm

While driving to work today I was following a big suburban that had a sticker that read:

“Still voting Democrat? You’re stuck on stupid!”

*sigh*

Sometimes I hate living in the South..

Newer Posts »

Powered by WordPress