Debian: fglrx-8.28.08

Just thought I’d throw this up.

I just switched over to kernel 2.6.17, and in doing so I needed to rebuild my fglrx kernel module to get hardware graphics going. Well the old package (8.24) would not compile under 2.6.17, so I did a little digging around the package page at debian.org and saw that there’s a 8.28.08.

Problem is the binary was only for 64bit. While my processor is 64 bit, I’m probably not going to move over to a 64 bit install until etch (especially considering it’ll require a complete fresh install).

So I got the 8.28.08 source. It consists of an archive and a diff patch. Well I’m still very much a linux neophyte and didn’t know how to proceed. That’s where this really great tutorial came in. It gave me everything I needed to know to get the actual .debs built. Beyond that it was simply following the fglrx-kernel-src package’s readme (using the module-assistant method) and wham bam thank you ma’am.

Got to love the resources at your fingertips. Even better, Murray’s has a date stamped with it, so if someone in five years finds it they’ll know that it may not be entirely accurate.

That was a problem I ran into recently in dealing with some other kernel modules, and something I run into all the time on google: old/obsolete data. Far too many posts, tutorials, etc. are undated. I believe Google should find some way to rectify this with their massive collection of what exists on the web.

Yes, it would mean more data pulled and stored for each site, but ultimately it would be useful data. Stamp it the first time you get it, and stamp it with the most recent pull. Maybe somehow allow users to tag certain pages as time-sensitive. Ultimately it’s good to have old data around provided that you know it’s old, and you can build a chain of events/data before and after it to give it context.

I’d also just like to say that I am loving linux. There are pains to making any change in your routine, but this has been an almost painless experience with no small amount of thanks due to the coders, maintainers, everyone who has ever filed a bug report or made a newsgroup, e-mail list, or web board post, and all of those friendly people on IRC that will make fun of you, and bitch at you, but above all still help you. linux for the world.

Are planes too safe?

Of course not. But are the recent measures safer? Do shoe-removals and liquidness remove the threats? Hardly.

If the recent move by Britain and the US (among others) to step up ‘security’ against specific threats were worth piss in a fire, they would have instituted them long before now. The threat is not a new threat. The existence of liquid or gel explosives is not a new threat. The fact that a plot was apparently thwarted against a specific attack does not make the issue new or the ‘solution’ novel.

What we are seeing is a PR move. This is all to help an industry. An attempt to maintain the public’s confidence in air travel.

The real solution will cost a lot more money, and won’t help the extant leaders maintain their thinly veiled records on terrorism and innovative policies.

It’s a shame that their facade holds even now. Bush failed to prevent terrorism, and yet he’s seen as being strong against it. Blair failed too.

I’m a strong advocate for mass transit systems. People tell me, “well trains won’t work here I live in the middle of nowhere,” or talk about how trains are just as viable of terrorist targets as planes.

They discount the idea that new ideas might crop up if we actually invest in the research. That we could invent ways to reduce crime, make policing easier, reduce threats, increase efficiency, build a stronger economy, et al. in a single swoop of action.

There’s not a state in the Union that evermore dares to try to be the city upon the hill. There is not a state, or a city, that has charged itself with a radical overhaul and the journey into the unknown to find and prove by the steel of their own resolve a new way of life. That’s the way that others will change, when they see someone else change first. It doesn’t have to be perfect, only more perfect.

But it can’t be leadership as usual. No one has all the answers, and yet the politicians will pretend they do. Rather than a leader who will say, “things are great and they’re gonna stay that way,” we need leaders who say, “I’m here to try something else, and if it doesn’t work I will be the first to admit it, and the first to work on a different idea.”

It hasn’t happened for a couple of centuries now, but that doesn’t mean it can’t.

To hell with tradition, lest that tradition be innovation.

Life Tip #1

I may make this a regular thing, but if so I may feel ashamed to start with such a targeted hint. We’ll see.

Life Tip #1: If you ever submit a clip from a tv show or other dated material to YouTube, include the date in the description.

It just makes sense.

Fontforge

So I’ve been playing around with fontforge.
Figured I’d throw up a small screenshot of some sample text.

Obviously it lacks the consistency a font needs, but it’s in progress and fontforge is a great tool to make fonts.

Screenshot

With PHP XScreensaver displays news

One of my favorite packages that spans the linux distro universe is XScreensaver. Indeed, any OS that uses X can make use of this screensaver package. In setting it up, I found myself drawn to a few specific screensavers that do more than eyecandy. They display text from 1) Host name and time, 2) Static text, 3) Text file, 4) program text output, or 5) URL. So I threw the google news RSS feed URL in and enjoyed seeing the latest news when my screensaver came on.

This provided a problem. Most RSS (and Google’s feed was no exception) provide only brief summaries of their items. I wanted full-text. So, to accomplish this I found the easiest (though not the best) way was to create a PHP script with the help of some prefab scripts (namely Magpie for the RSS and a script [link] to grab the html from each item).

While an imperfect solution, it gives the full stories; the combination of html stripping in PHP and XScreensaver’s HTML parser make it a pretty solid combination.

Screenshot

Please, if you have any suggestions/changes/other similar implementations to shout out about, drop a comment or an e-mail. I’d really like to see what else is out there.

And now the (shoddy) code (Formatted for publication using code2html):

 1 //Needed for magpie:
 2 define('MAGPIE_DIR', './magpierss/');
 3 require_once(MAGPIE_DIR.'rss_fetch.inc');
 4 //From the grabber script:
 5 	$config['start_tag'] = "<p>"; // where you want to start grabbing
 6 	$config['end_tag']   = "</p>"; // where you want to stop grabbing
 7 	$config['show_tags'] = 0; // do you want the tags to be shown when you show the html? 1 = yes, 0 = no
 8 //from the magpie examples:
 9 
10 	//Modified to use a single rss URL
11 	$rss = fetch_rss('http://news.google.com/nwshp?hl=en&ned=us&output=rss');
12 	//Modified to create an explicit array and shuffle it to get a random item.
13 	$rss_array = $rss->items;
14 	shuffle( $rss_array );
15 	foreach ( $rss_array as $key => $item )
16 	{
17 		if ($key > 1) {
18 			break;
19 		}
20 		$config['url'] = $rss_array[1]['link'];
21 		//From grabber script:
22 		$grab = new grabber;
23 		$grab->grabhtml( $config['url'], $config['start_tag'], $config['end_tag'] );
24 		if (!$grab->error) {
25 			foreach( $grab->html[0] as $html )
26 			{
27 				echo htmlspecialchars( $grab->strip( $html, $config['show_tags'], $config['start_tag'], $config['end_tag'] ) ) . "<br />";
28 			}
29 		}
30 	}
31 
32 	//From grabber script:
33 	class grabber
34 	{
35 		var $error = '';
36 		var $html  = '';
37 	
38 		function grabhtml( $url, $start, $end )
39 		{
40 			$file = file_get_contents( $url );
41 		
42 			if( $file )
43 			{
44 				if( preg_match_all( "#$start(.*?)$end#s", $file, $match ) )
45 				{				
46 					$this->html = $match;
47 				}
48 				else
49 				{
50 					$this->error = "Tags cannot be found.";
51 				}
52 			}
53 			else
54 			{
55 				$this->error = "Site cannot be found!";
56 			}
57 		}
58 	
59 		function strip( $html, $show, $start, $end )
60 		{
61 			if( !$show )
62 			{
63 				$html = str_replace( $start, "", $html );
64 				$html = str_replace( $end, "", $html );
65 				
66 				//Added the PHP function strip_tags and strip any numeric html character references:
67 				$pattern = '/^\&\#(\d+);$/u';
68 				return preg_replace( $pattern, '', strip_tags( $html ) );
69 			}
70 			else
71 			{
72 				return $html;
73 			}
74 		}
75 	}