Planet Larry

June 17, 2008

Patrick Nagel

Firefox “Download Day”

They asked for it - they got it… a nice DDoS ;) (spreadfirefox.com and mozilla.com were unreachable for a couple of minutes after 17:00 UTC).

Anyway… go ahead and download it, it’s a good piece of software. I tried out beta3 and the RCs, and I like the new version so much, that I’m now using Firefox as my default browser again (after more than two years with Konqueror as my default browser).

Download Day 2008

Nice birthday present by the way, Mozilla! Thanks! :)

June 17, 2008 06:17 PM :: Shanghai, China  

Bandan Das

Homework time

The best browser ever, landed on earth today but while big daddy was busy asking everyone to do their homework to get ready for the party, he failed to do his own.

First and foremost, as all of us came know a little later, the download day was not just 17th June, 2008; it was 17th June 2008 at 10:00 am PDT. No one ever cared to inform that important piece of shit. All big daddy wanted was a 1 million downloads in 24 hours, he didn't care how frustrated you would be to find out that you don't see your download at 12 am of June 17th, local time. And no Sir, I am not asking you to take care of all the time zones here, a simple countdown timer on the website would have been enough. Moral of the story: Big Daddy, you came up with something really impressive, you made us do our homework, but you failed to do your own!

Now, everyone knows that the digg effect is not just limited to sites on Digg's front page. Anyone can feel it; especially when you want 1 million downloaders to come to your site when you release the most anticipated browser ever, what on earth were you thinking ?! It's never going to be a breeze. Everyone knows that! Again, you failed to do your homework! Moral of the story: You promised us all the good things on June 17th, and all the good things you did give, but; the overall experience was somewhat dissapointing :(

Ok, now that my rant is over, I am off to start enjoying my brand new browser :)

read more

June 17, 2008 06:04 PM :: India  

Sean Potter

Gentoo Linux on my MacBook

I purchased my MacBook back in November of 2007, shortly after the Santa Rosa chipset update. I'd use Mac OS X a little previously, mostly in the form of trying out OSX86 on my old laptop. After using it for several months as my primary mobile platform, I decided it was time for something different.

OS X is nice and all. User-friendly, intuitive, and works fantastic with the hardware Apple ships. I still feel it's lacking in some areas where Linux excels, such as configurability and the space for customization. Not to mention that there's essentially no decent games out for OS X. I can install Linux and throw on a native version of UT2004 and play away now.

Installation wasn't horribly difficult, but Mac OS X was needed at least initially, and I didn't realize this. Gentoo now boots without an issue on the MacBook. All that I need to finish doing is installing the programs I need and setting up the WiFi.

I'm hoping that I have all the hardware working correctly in the next week or so, and that includes the web cam and touchpad. My only other concern is battery life. It'd be fantastic if I get the same amount or more battery out of the machine with Linux.

June 17, 2008 04:37 PM

Nirbheek Chauhan

AutotuA Weekly Status Report - I (and more ;)

Yes, I am alive and kicking. Although at a much slower pace than I would've liked ;)

So I sent my first weekly report over yesterday, you can either read the (excessively long and probably boring and or confusing) weekly report or you can, well, do something else :P

And guess what, next time onwards, all you have to do is checkout the AutotuA news page or subscribe to the "gsoc" label on this blog to stalk me.

Oh, right, this will also probably be my first post on the FLOSS India Planet!

Hello everyone!~ I'm Nirbheek Chauhan (also called as "slacker #1" by some). I was one of the co-ordinators of this tiny little event in IIT Kanpur's tech-festival Techkriti.

You might have heard about it and maybe seen the awesome speakers (and posters ;) of the event.

You've probably had the pleasure of conversing with the mastermind behind the whole event.

And maybe, just maybe, you've heard about "FOSSKriti" :D

PS: We'll (hopefully) be back next year, so this is shameless advance publicity ;p

June 17, 2008 04:29 PM :: Uttar Pradesh, India  

Brian Carper

Westinghouse, the saga continues

Friday a guy on the phone said he'd call me back Monday or Tuesday to give me an update on when / whether they're ever going to send me my monitor. Monday came and went with no call. Not really surprising.

I filed a complaint with the BBB today. We'll see how that goes. At the BBB Westinghouse has around 150 complaints in the past 36 months, but 133 of them were supposedly solved "satisfactorily" and Westinghouse somehow still has the highest possible rating at the BBB. I've read some things about the BBB not being an entirely neutral entity itself, but who knows. I'll start filing complaints with other consumer groups if I need to.

A good handful of people have left comments here at my blog saying they aren't going to buy anything from Westinghouse themselves, which is great to hear. I may mention my blog to Westinghouse next time I call them, if there is a next time. Is not sending me the monitor I paid for really worth losing a bunch of customers?

The sad thing is that I really do need a monitor with component and composite inputs, and they are somewhat rare (the local store had none except Westingcrap brand). However I have found a Gateway model that has them, so maybe that'll work out. I'd gladly take a refund from Westinghouse rather than a monitor at this point.

June 17, 2008 07:56 AM :: Pennsylvania, USA  

June 15, 2008

Michael Klier

Mail Client Quest

I've spent almost the whole last week testing different mail clients because I somewhat wasn't happy with mutt (especially the address book functionality sucks). Also, now that there are new methods in categorizing data, via tags/labels for example, the possibilities of processing my mails effectively with mutt seemed limited.

Until now I've used my INBOX as a staging area to organize tasks which are associated around the projects I am involved. I simply kept mails which required action on my behalf in my INBOX. Be it that I just have to reply or that I have to look at something or fix a bug, you get the picture. Since I get lots of emails (~1000 on an average week) things got quite messy in times and I sometimes forgot about some of those mails/tasks. What I ideally wanted to have is a way to label messages and then search my INBOX for mails which have a certain label assigned, or limit the number of mails I see by certain key words. The IMAP protocol supports user defined labels which would be a starting point, but mutt doesn't support them :-( (it should be noted here that mutt wasn't designed to work with IMAP in the first place).

I first took a look at sup. Sup is written in Ruby and promises a completely new approach to mail. Most of it's features are inspired by gmail and mutt. It supports labeling of messages, vim style key bindings and some really nifty quoting features like auto folding in mailing list threads. It's usage is quite intuitive when you come from mutt and I've used it exclusively over the last week. But, all those nice shiny features aside, sup has some major drawbacks. To allow labeling of messages it manages it's own index where it keeps all the related meta data. The problem with that, is that it doesn't update the mail status on the server side. Means, mails that appear as read in sup are still unread in the INBOX on the IMAP server. You also cannot move mails between IMAP folders, sup provides it's own folder mechanism though. Also, if you access your INBOX from another mail client and change things, like moving mails to folders etc. sup won't start anymore because you have to sync it's local index again with the IMAP account.

The other client I've tried was cone which is part of the courier-mta project. This mail client is designed from the ground to deal with IMAP accounts (it supports POP3 as well), therefore it allows labeling of messages. It also allows you to store it's configuration settings on the IMAP server itself and supports IMAP address books. That all would fit perfectly if it's user interface wouldn't be that crappy (IMO at least). Well, I have to say that I am quite used to have vim key bindings everywhere possible, browser, shell, editor (hah!) and preferably in my mail client as well. Also the way how mailinglist threads are visually presented in the INBOX listing is not satisfactory once you're used to the nice thread view mutt offers.

So it seems I won't get 100% lucky anytime soon. I didn't try alpine, because form what I've seen on some screenshots it doesn't provide a nice thread view. And before someone now says “gmail”, I don't like to have my private mail on a machine I have no control over whatsoever ;-).

At least I was able to solve my todo crisis. Tante mentioned remember the milk lately on friendfeed as being a nice tool to manage ones todo lists. While I have heard of it multiple times, I haven't tried it until two days ago. I have to say it's quite nice. I love the fact that you can navigate your online todo list with the keyboard only :-) and especially that you can mail new tasks, which then appear in your task INBOX (hah! another one). Though I would prefer not to have to process new tasks which I've send by mail in my task INBOX again.

So I think for now I'll stay with mutt, although it's IMAP support is somewhat limited.

What mail clients to you use and why? Do you have any suggestions? Did I miss one (ncurses/command line clients only)? Is there a nifty tool to integrated IMAP address books in mutt (I've searched but with no luck)?

UPDATE: Ok, it seems I was a little quick on this one, because cone has a nice threading view. You can enable it by using $ + T. I'll use cone now for the upcoming week and see if I can get used to it's different key bindings (I constantly hit ”j” and ”k” to navigate around but it doesn't work ;-)). Anyway, the better IMAP support will probably be worth it.

Read or add comments to this article

June 15, 2008 08:49 PM :: Germany  

Martin Matusiak

renewip: when the router keeps disconnecting

So we now all have broadband connections and everything is great, right? Well, not quite. Some providers have better services than others. My connection seems rather fragile at times and tends to die about once in three-four days. When that happens, no amount of resetting the equipment helps to get it working again. It’s an upstream issue that I have no control over.

But there is another problem. Once the cable modem starts working again, the router (which receives an IP address from my provider, and serves LAN and wifi locally) doesn’t seem to know this and doesn’t automatically re-establish a connection. Or I’m not really sure what it does, it’s a black box and there is a web interface to it, where there’s a button to press to do this, which sometimes works. But what really is happening, who knows. There seems to be a weird timing problem to the whole thing, where if I kill the power for both the modem and the router and they both come back at the same time, it generally works. However, if the modem is taking longer to negotiate a link, the router will be disconnected. And apparently doesn’t try to reconnect on its own, so I’ve been stuck rebooting the two a few times until the timing is right. Resetting them separately for some reason doesn’t seem to work.

So what can be done about it? Well, the router does have that stupid web interface, so it’s possible to make those clicks automatically if we’re disconnected. Python’s urllib makes this very easy to do. First we login with router_login, which submits a form with POST. Then we check the state of the internet connection with check_router_state, which just reads out the relevant information from the page. And if it’s disconnected we run renew_router_connection to submit another form (ie. simulating the button click on the web page).

Testing connectivity

More than just testing if the router has a connection to the provider, broadband connections sometimes have connectivity problems. Even if you can get a connection, the provider sometimes has problems on his network, meaning your connection doesn’t work anyway.

So I came up with a test to see how well the connection is working. It’s an optimistic test, so that first we assume we have a fully functional connection and ping yahoo.com. It doesn’t matter what host we use here, just some internet host that is known to be reliable and “always” available. For this to work these conditions must be met:

  1. We have to reach the gateway of the subnet where our broadband IP address lives.
  2. We have to reach the provider’s nameserver (known as dns1 in the code) to look up the host “yahoo.com”.
  3. We have to reach yahoo.com (we have their IP address now).

So first we ping yahoo.com. If that fails, it could be because dns lookup failed. So we ping the provider’s nameserver. If that fails, the provider’s internal routing is probably screwed up, so we ping the gateway. And if that fails too then we know that although we have an IP address, the connection is dead (or very unstable).

#!/usr/bin/env python
#
# Author: Martin Matusiak <numerodix@gmail.com>
# Licensed under the GNU Public License, version 3.
 
import os
import re
import sys
import time
import urllib
 
ip_factory = "192.168.2.1"
password = ""
 
inet_host = "yahoo.com"
 
 
def write(s):
    sys.stdout.write(s)
    sys.stdout.flush()
 
def grep(needle, haystack):
    if needle and haystack:
        m = re.search(needle, haystack)
        if m and m.groups(): return m.groups()[0]
 
def invoke(cmd):
    (sin, sout) = os.popen2(cmd)
    return sout.read()
 
def ping(host):
    cmd = 'ping -c1 -n -w2 ' + host + ' 2>&1'
    res = invoke(cmd)
    v = grep("rtt min/avg/max/mdev = [0-9.]+/([0-9.]+)/[0-9.]+/[0-9.]+ ms", res)
    if v: return int(float(v))
 
def find_lan_gateway():
    cmd = "route -n"
    res = invoke(cmd)
    v = grep("[0-9.]+\\s+([0-9.]+)\\s+[0-9.]+\\s+UG", res)
    if v: return v
 
def load_url(url, params=None):
    data = None
    if params: data = urllib.urlencode(params)
    f = urllib.urlopen(url, data)
    return f.read()
 
 
def router_login():
    form = {"page": "login", "pws": password}
    load_url("http://%s/login.htm" % ip, form)
 
def check_router_state():
    state = { "conn": None, "gateway": None, "dns1": None }
    router_login()
    s = load_url("http://%s/js/js_status_main.htm" % ip)
    if s:
        v = grep("var bWanConnected=([0-9]);", s)
        if v == "1": state['conn'] = True
        elif v == "0": state['conn'] = False
        if state['conn']:
            g = grep('writit\\("([0-9.]+)","GATEWAY"\\);', s)
            if g and g != "0.0.0.0": state['gateway'] = g
            g = grep('writit\\("([0-9.]+)","DNSIP"\\);', s)
            if g and g != "0.0.0.0": state['dns1'] = g
    return state

def renew_router_connection():
    router_login()
    form = {"page": "status_main", "button": "dhcprenew"}
    s = load_url("http://%s/status_main.htm" % ip, form)
    return s
 
 
 
ip = find_lan_gateway()
if not ip:
    ip = ip_factory
    write("LAN gateway detection failed, using factory ip %s for router\\n" % ip_factory)
else:
    write("Router ip: %s\\n" % ip)
 
while True:
    try:
        router = check_router_state()
        t = time.strftime("%H:%M:%S", time.localtime())
        if router['conn']:

            hosts = [(inet_host, inet_host),
                ("dns1", router['dns1']), ("gateway", router['gateway'])]
            connectivity = ""
            write("[%s] Connected  " % t)
            for (name, host) in hosts:
                delay = ping(host)
                if delay:
                    write("(%s: %s) " % (name, delay))
                    break
                else:
                    write("(%s !!) " % name)
 
            write("\\n")
        else:
            write("[%s] NOT CONNECTED, attempting reconnect\\n" % t)
            renew_router_connection()
    except Exception, e:
        cls = grep("<type 'exceptions.(.*)'", str(e.__class__))
        write("%s: %s\\n" % (cls, e))
    time.sleep(3)

Download this code: renewip.py

June 15, 2008 07:20 PM :: Utrecht, Netherlands  

Brian S. Stephan

Sender Policy Framework 2

Finally got Sender Policy Framework support added to my Postfix install like I said I would. HowtoForge was a big help, but I had to use g-cpan to generate Mail::SPF ebuilds. Just one of those things I was surprised wasn’t already in Gentoo.

Next up: testing that SpamAssassin supports SPF and penalizes failures. I think I have had everything in place to do that properly for a while, now, but I never actually checked…

June 15, 2008 04:45 PM :: Wisconsin, USA  

Jürgen Geuter

Banshee

Been looking at GTK based audio players for quite a while (amarok is nice but it looks alien and the 1 branch is rotting more and more while work on the 2.X branch continues) and since banshee released their 1.0 recently I gave it a try.

The interface is somewhat different from amarok's but there's a few really great things about it:

  • last.fm streams don't just play one song, you can look a few songs into the future to see what's coming up

  • last.fm radio skipping/loving/banning works

  • Library import is quicker than with amarok

  • Interface feels snappier than amarok's

  • Video support - great for music videos and vidcasts



So it's really nice, but there's a few things that need change IMO:

  • Writing plugins right now is done in C# or Boo, I'd love to have some of the bigger scripting languages thrown in there (like Python). Boo is a scripting language but who the hell uses and knows it?

  • Cover art can only be downloaded automatically. Sometimes I do have music from a netlabel where banshee won't find the covers on amazon. I'd like to be able to set my own covers.



After some toying around with it it seems to be a really great player that's not plagued by the slowness that some mono apps seem to have, if you were looking for a good GTK based player, you might wanna try banshee.

June 15, 2008 02:56 PM :: Germany  

Johannes Gilger

SVN is not a content-tracker

jojo@host:~/svn/test$ svn add git-talk.pdf
A (bin) git-talk.pdf
jojo@host:~/svn/test$ svn commit -m ‘First file’
Adding (bin) git-talk.pdf
Transmitting file data .
Committed revision 1.
jojo@host:~/svn/test$ du -sh ../test-repo
6.5M ../test-repo
jojo@host:~/svn/test$ cp git-talk.pdf git-talk2.pdf
jojo@host:~/svn/test$ svn add git-talk2.pdf
A (bin) git-talk2.pdf
jojo@host:~/svn/test$ svn commit -m ‘Second file’
Adding (bin) git-talk2.pdf
Transmitting file data .
Committed revision 2.
jojo@host:~/svn/test$ du -sh ../test-repo
13M ../test-repo

I rest my case. Now some of you (those who know git and know why they use it) might say “so what, that is no secret” while others may flip over backwards. The second group of people is the one I wanted to reach ;)

June 15, 2008 10:02 AM :: Germany  

Brian Carper

My desk

Following in the footsteps of Sean Potter I took a photo of my desk.

My desk itself sucks, but I'm moving again in a year or so and didn't want to invest in a good one yet. I'm missing one of my big monitors (thanks Westinghouse) and in the meantime I have to settle for that old Apple display as my second monitor.

My mousepad is an Icemat; can you believe the green ones were cheaper than all the other colors? That shade of green is clearly the best. And my keyboard is a tasty Saitek Eclipse II, which is one of the most comfy keyboards I've found to type on (and it glows in the dark). Nothing too exciting beyond that.

June 15, 2008 02:32 AM :: Pennsylvania, USA  

June 14, 2008

Brian Carper

Python

People are stupid. We're blinded by our own prejudices and biases and preconceptions. It's kind of understandable because no one has enough time to really collect enough information to have an informed opinion about everything. So we end up extrapolating or relying on expert opinion or turning to our gut feeling. Inevitably we end up being wrong some of the time.

This leads to two problems. One is that being a person myself, I'm also stupid, meaning there are almost certainly some beliefs I currently hold that are wrong. The second is that from my perspective, I appear to be right about everything. This is trivially true of everyone; as soon as a person decides they're wrong, they change their mind right away and become right again. The problem then is how can I tell when I'm wrong and when I'm right? I quick objective glimpse at reality suffices most of the time, but sometimes we're still tricked.

Those two things in combination are a problem for everyone. I think the best anyone can do is to realize that this is the case, be open to being wrong, and to take some efforts to rectify it. At least minimize the damage, try to be as right about as many things as you can.

This is why e.g. I started learning Emacs even though I love Vim, and why I stick with it even though it's unpleasant at first. A lot of smart people say good thing about Emacs. My opinion of it is much different now than before I'd used it a lot. I think many things people say about it are wrong, but many are also right. There is some good stuff there.

For the same reason, I've decided to learn Python. I've been wanting to for quite a while anyways. In spite of the pain I've had trying to use it in the past, and my generally low opinion of the language, there may just be something worthwhile there. A lot of smart people say good things about it, and a lot of good programs are written in it. The community is large and active and enthusiastic.

My first shot was to try some of the stuff at Python Challenge. It's an interesting site full of puzzles that you need a programming language to solve; many of them are geared toward Python or toward libraries available in Python, but you can use any good language for many of them. I got through 17 of the puzzles last night, but I did look at "hints" on the forum for about half of those. A lot of them require sort of specialized knowledge apart from knowledge of Python, on a wide variety of subjects, so it's pretty fun.

My first pet peeve (of many to come, I'm sure): why doesn't python --help or python --version work? Instead you have to use python -h and python -V (capital V). This is non-standard. It worries me when people do things like this differently. But we'll see.

June 14, 2008 07:14 PM :: Pennsylvania, USA  

Leif Biberg Kristensen

More regular expression fun in PostgreSQL

Stimulated by the success of my previous foray into the regex arcana of Postgres, I finally took on a problem that has been bothering me for a long time. When I merge persons, shortlinks to the old person_fk may still be hanging around in sources and events. It’s not a matter of great concern, because the link from the old person to the new person will always remain in the database. But I still like to have the links pointing to the “right” person. To clean up in this, I decided to write a script that hunts through the entire database and updates shortlinks to merged persons. I used Perl for this one, because it’s the kind of problem that lends itself well to Perl’s inbuilt search-and-replace syntax (and because I really need some practice with the Perl db interface):

#! /usr/bin/perl

# update_shortlinks.pl
# finds notes and sources with shortlinks to merged persons
# and replaces old_person with new_person
# (C) leifbk 2008

use strict;
use DBI;

my $database = "DBI:Pg:dbname=pgslekt";
my $dbh = DBI->connect("$database") or die $DBI::errstr;

my $get_merged = $dbh->prepare("SELECT old_person_fk, new_person_fk FROM merged");
my $get_source = $dbh->prepare("SELECT source_id, source_text FROM sources WHERE source_text SIMILAR TO ?");
my $put_source = $dbh->prepare("UPDATE sources SET source_text = ? WHERE source_id = ?");
my $get_event = $dbh->prepare("SELECT event_id, event_note FROM events WHERE event_note SIMILAR TO ?");
my $put_event = $dbh->prepare("UPDATE events SET event_note = ? WHERE event_id = ?");

$get_merged->execute();
while (my ($old_person, $new_person) = $get_merged->fetchrow_array()) {
    my $regex = "%\\[p=" . $old_person . "[\\|\\]]%”;
    $get_source->execute($regex);
    while (my ($source_id, $source_text) = $get_source->fetchrow_array()) {
        print “Source $source_id, $source_text ($old_person -> $new_person)\n”;
        $source_text =~ s/(\[p=)$old_person([\|\]])/$1$new_person$2/g;
        $put_source->execute($source_text, $source_id);
    }
    $get_event->execute($regex);
    while (my ($event_id, $event_text) = $get_event->fetchrow_array()) {
        print “Event $event_id, $event_text ($old_person -> $new_person)\n”;
        $event_text =~ s/(\[p=)$old_person([\|\]])/$1$new_person$2/g;
        $put_event->execute($event_text, $event_id);
    }
}
$get_merged->finish;
$dbh->disconnect;

Don’t forget to backup your database before you start to play around with scripts of this kind.

June 14, 2008 01:22 PM :: Norway  

Niel Anthony Acuna

on my own and moving on

i’ve been puting off a lot of things lately. at the top of my list is to give some just attention to this little web space of mine. its not because i don’t have time anymore. its just that, i felt the need to explore some de-stressing activities other than writing my thoughts and rants down. i always found writing rather emotionally helpful, but during those carefree college days, i rarely
did anything to the point of exhaustion.

but im bringing my hiatus onto a peaceful end. good day! gentoo powerpc land!

June 14, 2008 03:37 AM :: Zamboanga, Philippines  

June 13, 2008

Jürgen Geuter

Python Webserver in 5 seconds

Since the old blog died and somebody was asking for the code, if you just need a webserver real quick to give someone in your net access to some files on your machine, go to the respective directory and run python -m SimpleHTTPServer which gives you exactly what it says, a simple HTTP server with the current dir as webserver root. No fancy-shmancy config necessary.

June 13, 2008 09:24 PM :: Germany  

George Kargiotakis

Αναλύοντας ένα attack σε honeypot

Ο Δημήτρης έχει μια αρκετά καλή ανάλυση ενός attack σε ένα honeypot που έχει στήσει για πειραματισμούς. Αξίζει να του ρίξετε μια ματιά… Επιτέλους μας την έπεσαν

June 13, 2008 03:16 PM :: Greece  

June 12, 2008

Jason Jones

My First Python Script

When I went in to my 6 month review about 4 month ago, I didnt know what I was in for.

I assumed things would go well because I had accomplished everything I set out to do and more, so I felt pretty good.

The interview went very well.  They complimented me on my work, the sales reports, the new web site, the money I was saving the company and all that.  Then he asked me what my goals would be for the next 6 months.

I didn't anticipate that, so, I asked him what he meant (read: stalled while I frantically thought of something I could do in six months).  He responded while I didn't listen at all - thinking.

About the time he was done saying whatever it was he was saying, the thought popped into my head, "Hey!  I'll try learning a new language!".

In the IRC room I lurk in daily, #UPHPU, the python language frequently was the subject of hot debate, so I blurted out,

"I'll learn Python."

And that was that.  Well...  It's now 4 months later, and the perfect opportunity presented itself for me to see what this Python is all about.

We received the old servers upon which the old website ran from the old company with whom we do no business anymore, thereby barring ourselves from further thievery.

I took a look at these servers and realized they are much beefier than the ones currently running the server.  So, my boss and I decided to wipe off the dross currently installed on them (read: Windows 2003 Server), and installed gentoo with a healthy LAPP stack on em'.

Well, the last thing I needed to do to get these suckers fully up and running was to install some sort of RAID monitoring system.  The old servers had the mdadm program taking care of the RAID.  These boxen have hardware RAID controllers on them, so using the mdadm monitor was out.

To make an already long story shorter, suffice it to say I found a program called cciss_vol_status which seemed to do the trick nicely.

I just needed to find a way to run it every day and email me the results.

Needless to say, this is where Python comes in.

My first impressions of Python, coming from PHP, of course, are the following:

  1. It seems very complicated.

  2. Why the need to import modules which PHP has natively?

  3. The learning curve for something new always sucks.  Thinking to myself, "I could have had this done 2 days ago, if I was doing it in PHP"

  4. Its syntax is radically different, and oddly attractive to me.

  5. From my noobie standpoint, it seems that Python has the potential to be much more powerful than PHP - after the learning curve.



Basically, I began writing the script yesterday, and worked on it for about 5 hours.  I finished the script after about 1.5 hours working on it today.  I'd have to say that 90% of the speed with which I finished it was due to the tutorials written online for the specific modules I needed.  The #python IRC channel provided a few clues as well.

Anyway...  I'd like to continue learning Python, but I'm not sure how suited it would be to web development.  I've got my nitche down really well within PHP, and it'd be a shame to stop that to learn something new - just for the sake of learning it.

The flip-side, however, is that with my knowledge of python (if I should choose to pursue it and learn it to the degree I know PHP), I'd be in a much better position to continue marketing myself.

We'll see.

Anyway...  That's today's story.

Life is good.

June 12, 2008 05:09 PM :: Utah, USA  

Luca Gasperini

Superkaramba and Gentoo

Nowadays it seems that superkaramba works well, in the past it was heavy and buggy and I used to have conky. There are no particular reasons that made me switch to superkaramba , other than moving from Gnome to Kde.

My superkaramba monitor is based on the dual cpu monitor by Loacoon, I changed it a little to show some useful stuff , some of them gentoo specific ( last sync, last emerges, currently emerging….. genlop is a dependency).

superkaramba

Here’s the code, on my system superkaramba themes are in ~/.kde3.5/share/apps/superkaramba/themes/

Superkaramba theme

June 12, 2008 03:21 PM :: Italy  

Thomas Keller

Ruby on Rails, part 2

OK, after I installed a first RoR testing environment on my home server, I started experimenting. Now I finally managed to have an application up and running - although it’s just a rough test app…. Thanks to vinniez, I also installed passenger (it in portage - masked, but working!) and went on like this: added the “-D [...]

June 12, 2008 02:38 PM

Sean Potter

New Car Stereo

I finally took the plunge and had a car stereo installed in my 1998 Chevy Prizm. It's a cheap Sony model, but it has a detachable faceplate and front auxiliary input. The auxiliary input is what I was after, however. Unlike my old car, a Dodge Stratus, the Prizm doesn't have a tape deck or CD player. I was forced to play my music over an FM transmitter that ate two AAA batteries every two-to-three days. Modern technology, eh?

I eventually broke the transmitter and started listening to the radio, which gets repetitive. Amanda suggested getting a car stereo, so I finally gave in and had it done. Rather than spending a few hours putting the wiring hardness together, I had the fine folks at Circuit City do it for a small fee.

It works great. Now I just need to fix my air conditioning or buy a new car. Greeat.

June 12, 2008 08:31 AM

June 11, 2008

Jürgen Geuter

Marketing through blogs

Marketing is old and I guess it won't go away very soon (though I'd love it to die) and especially with the advent of blogs many people started wondering how to make money from all of this.

The first idea was to make their blogs utterly worthless by plastering banners and advertising all over it. This worked for a while, but nowadays random ads don't really pay a lot unless someone clicks on them and many people have adblocking software running either on their computer or their brain. Ads are pretty much dead at least in the way that most people know them.

But with everything having to have a pricetag attached to it (cause if there's no money to be made it has to be utterly worthless, right [yes, that is sarcasm]) people had to come up with new ways to place their marketing in the stream of information. This lead to one of the most filthy kinds of advertising: The "pay per post" advertising.

The idea is simple: Some company pays you a few bucks to write over their product. Usually the claim is also to not force people to write a positive review (ignoring the fact that many of the people selling their own personal place in the web for peanuts are usually so thankful for the few bucks that the review will be at least somewhat positive), because the review itself ain't all that important, it's about getting your service linked which means more google rank which means more "importance" when it comes to searches in google.

We see this type of marketing a lot, not only by advertising companies but also by people wanting to promote their little blogs: You start a competition and force everyone to link to your blog post to participate which gives you rank and importance (and your advertising income might raise from 1 buck/month to 1.50).

Now I can see why people do it, hell, I'd love to be able to be able to live by just writing my blog (and that would bring up the posting frequency ;-) ) but there's always a cost and when it comes to your own blog the cost is high.

I have written about the importance of your feed before (pretentiously quoting myself):
Your website's RSS feed is as important as your business card, as your "real" website, actually it's replacing your real website more and more. Having a broken or nonfunctional RSS feed is probably even worse than having none: If you have none some people might not check your site regularly but at least you don't look incompetent.
But what about your own blog?

Well, there are two kinds of blogs: The commercial ones and the personal ones. It's really that simple.

The commercial ones are the "big" ones nowadays. Techcrunch, endgadget &ct. People there make a living of their blog, but they're not so much about creating really new content, they are basically about sales. They run reviews of stuff, they keep the buzz around certain companies or products going, they are completely unpersonal. Those blogs are not what I'd really call a blog anyways, they are basically just a different layout for "news" and "adverts" and "reviews" from a certain section of the market. Yes, they do have comments and sometimes use blogging software but they are dead as in lifeless.

On the other hand you have blogs by people, writing about stuff they care about, stuff they find interesting. Stuff that often no one would bother to pay for, though it can be brilliant. Or boring. It can be anything and that's exactly what makes them interesting: They can be everything the writer wants them to be. They are very human, very alive because they are not limited to some faceless, brainless, soulless market. They can show you what is cool about humans, they show every facet of human being.

As soon as you start letting people buy parts of your blog, you leave the second and enter the first realm. Your blog loses what made it interesting in the first place because you sold your integrity. Now if you just write iPhone reviews or crap like that, integrity ain't your business anyways (though the writes of those sales-campaigns would probably disagree), but if you want your blog to be yours and meaningful you just cannot have ads in them, ads of any kind.

Because how could you be trusted? If you sell posts, who tells me that the post I'm reading was not paid for? Who tells me that the post I read yesterday was "real" as in "written because the author really wanted to say this"?

It's been said many times, but advertising makes your blog look cheap. Because then it actually is. It's up for sale.

Just think about that the next time some blog starts a "competition" with a few prices in exchange for links or posts.

June 11, 2008 02:04 PM :: Germany  

Leif Biberg Kristensen

Regular expression fun in PostgreSQL

I have been doing a bit of refactoring again. This time, I’ve moved the link_expand function from PHP into Postgres. That’s the function that takes a piece of text like [p=123|John Smith] and transforms it to a fullblown internal link like <a href=”./family.php?person=123″>John Smith</a>. It’s very convenient to write links this way. Now, regular expressions work a bit different in Postgres than they do in eg. Perl. The Postgres regex engine is actually ported from Tcl, as explained in the documentation. So, there’s some relearning to do for an old Perl regex punk. Notably, the difference between greedy and non-greedy expressions is subtle and easy to miss. Note the expression E’\\[p=(\\d+?)\\|(.+?)\\]‘ below. In Perl syntax, you shouldn’t have to make the (\d+) atom (any old integer in plain language) non-greedy, but it’s required here.

Here’s the full link_expand function in glorious plpgsql:

CREATE OR REPLACE FUNCTION link_expand(TEXT) RETURNS TEXT AS $$
DECLARE
    str TEXT;
    tmp TEXT;
BEGIN
    -- the easy part: replace [p=xxx|yyy] with full link
    str := REGEXP_REPLACE($1, E’\\[p=(\\d+?)\\|(.+?)\\]‘,
            E’<a href=”./family.php?person=\\1″>\\2</a>’, ‘g’);
    — the hard part: replace [p=xxx] with full link
    WHILE str SIMILAR TO E’%\\[p=\\d+\\]%’ LOOP
        str := REGEXP_REPLACE(str, E’\\[p=(\\d+?)\\]‘,
                E’<a href=”./family.php?person=\\1″>#\\1#</a>’);
        tmp := SUBSTRING(str, E’#\\d+?#’);
        str := REPLACE(str, tmp, get_person_name(BTRIM(tmp, ‘#’)::INTEGER));
    END LOOP;
    RETURN str;
END
$$ LANGUAGE plpgsql STABLE;

(if you picked up an early version of this blog post, you may have noticed the subsequent “folding” of the three lines:

p := BTRIM(tmp, '#')::INTEGER;
name := get_person_name(p);
str := REPLACE(str, tmp, name);

into one:

str := REPLACE(str, tmp, get_person_name(BTRIM(tmp, '#')::INTEGER));

and, as a consequence, I’ve dropped the two superfluous vars p and name. It’s more compact, but of course also a little more obscure.)

The “hard part” still looks somewhat circumventious, but at least it works. And I do think that it’s a lot cleaner than the old PHP function with its forest of backslashes.

The main reason why I did this refactoring is not about code purity, though. There seems to be a bug in the PHP preg_replace() function that will only allow it to replace about fifty of my shortlinks in a given text. Given more shortlinks, it will just drop the entire text in the bit bucket. That may seem a lot, but, hey, do you remember the old “640K should be sufficient for everyone” meme? When you try to link up every person in a lenghty probate transcription, preg_replace() will run out of steam. It’s probably a memory allocation thing. However, I do expect the Postgres RE engine to be a lot more sturdy than the PHP one.

June 11, 2008 09:40 AM :: Norway  

Brian Carper

Westinghouse still sucks

Way back in March I sent in my L2410NM monitor for RMA to Westinghouse. This is June and I don't have it back yet. Last I heard they sent my case to their corporate office. I called again this week, call #16 or 17, I lost count, and I was told that they put in a request for a "status update", but having heard any update on it. I'm always promised a return call, but I've yet to receive even one of those. As of now they've promised to send me a new monitor and have given up hope of ever recovering my legendary lost monitor, and supposedly they even created the order in their system that will initiate the monitor-sending process, complete with a long string of letters and numbers representing my fates.

I almost wish they would say "Ha ha, just kidding, screw you customer, you're not getting anything from us" so that I'd feel justified in filing a complain with the BBB. But no, they keep the carrot dangling in front of my nose, inching closer and closer to resolving this issue. Likely I'm going to do so soon though. Not sure if it'll actually help anyways.

I've already ensured that my friends and family will never buy anything from them, nor will my place of employment, and hopefully some people reading this will also refrain. The real problem is, what company is any better? I keep a mental list of companies that have screwed me over, but that list is becoming so large that I'm running out of companies I can actually buy things from. I can at least prioritize according to the level of suckiness. Westinghouse tops the list at the moment.

June 11, 2008 02:55 AM :: Pennsylvania, USA  

Iain Buchanan

8bit paintball

This is damn funny! Especially since my state has just legalised paintball (no-one has set it up yet though - I'm waiting...)



And now for the gratuitous ad. which I nicely didn't remove:

See more funny videos at CollegeHumor

For those RSS and syndicate followers, try this link!

June 11, 2008 12:44 AM :: Australia  

Gentoo Linux Live USB key

I didn't believe my friend when he told me how easy this is, and yet he was right! From live CD image, to bootable USB key in only a few minutes!

Here's what I did, you may need to tweak it a bit for your setup. Firstly I used one 1Gb USB key / thumbdrive / flashdrive / whatever, because I use the live CD image. You could use the minimal CD image and use a smaller key. It appears to me as /dev/sdb.

0. dd if=/dev/zero of=/dev/sdb bs=512 count=1

The reason I did this is because I had corrupted both the mbr and partition table of the usb key. fdisk simply told me "unable to seek on /dev/sdb" and wouldn't continue. Skip this step if you can fdisk ok.

1. fdisk -l; fdisk /dev/sdb; fdisk a partition!

I join these steps together, cause they're all related to creating the partition. Make one partition covering the entire device. Something like "n p 1 t 1 83 a 1 w" should do it. Note I made it bootable, and I'm not using FAT.

2. mkfs.ext2 -L liveUSB /dev/sdb

You'll notice I'm using ext2 here. Wait for the device to finish writing, then unplug and re-plug it, or mount it manually.

3. sudo mount -t iso9660 -o loop /home/iain/Desktop/livecd-i686-installer-2008.0_beta2.iso /mnt/tmp/

There are multiple ways to do this. This is the one I chose.

4. sudo rsync -avP /mnt/tmp/ /media/liveUSB

5. sudo grub-install --root-directory=/media/liveUSB --nofloppy /dev/sda

6. reboot!


Remember to set your BIOS to boot from your USB drive. Now you have a live CD on a USB key. Much nicer than burning!

YMMV.

June 11, 2008 12:06 AM :: Australia  

June 10, 2008

Daniel Kerwin

New Howoto: Using the Vodafone PCMCIA UMTS card (Qualcomm MSM6275)

Just finished a small howto explaining how to use a Vodafone PCMCIA UMTS card with (Gentoo) Linux. Works very well and will work in less than 5 minutes. If you own this nice piece of hardware give it a try.

Go directly to the Howto

Thanks to Matthias for supplying me with many information's on this topic.

June 10, 2008 09:06 PM :: Germany  

Jason Jones

LDSCompanion.org Comment

For those of you who don't know, in addition to running ILoveMyJournal.com, I also run an inspirational website called LDSCompanion.org.

Today when I arrived at work, I had an email from someone who had pressed the "contact us" button.

The message I recieved encapsulates the entire reason I created that site, and caused tears to well up, as well as a sense of gratitude for having been given the gift of being technically adept.

Here's the message as it was sent to me: (the name has been removed for privacy)

"My name is (name not published), and I live in a little island in the caribbean by name San Andres. I was baptize the 11 of october of 1997 in Bogota-Colombia; but since april of 2003 when I return home I have loss every direct contact with the church because they are no members here and it has been really hard. Now I have acces to a computer and the opportunity to can read and nurture my spirith throug the motivational stories, inspired poetry, etc of thes web-site. And I know thah our Heavenly Father cares for each a every one of us and bless us, and answer us in misterious ways, thank you for being an instrument in his hands."

Point of the story is, you never know how many people your righteous example might affect.  Do the right, do it always, and unknowingly enlighten everyone around you.

June 10, 2008 11:05 AM :: Utah, USA  

June 09, 2008

Jürgen Geuter

Thinklab



This is a picture of my "lab" which is a setup of a bunch of (old) thinkpad laptops I got from a client to try out some network stuff (working on testing skolelinux for a local school). It's like a forrest of thinkpads. Fun! Let's hope they breed :-)

June 09, 2008 09:34 PM :: Germany  

Dirty urges...

For a few days I've had the urge to write something in PHP. What the hell is wrong with me?

All jokes aside, I think I'm not a "one language" kind of person: Python is still the language I find the most elegant and pleasant to work with but sometimes you just want something else, something quick and dirty I guess and for that PHP is perfect.

June 09, 2008 07:58 PM :: Germany  

Jason Jones

Video Editing With Kdenlive

I've recently become interested in integrating video into my journal and blog.  As such, I realized that my 4-year old digial camera just wasn't gonna cut it anymore, so I went out and bought the cheapest camera I could find that would shoot 30 frames per second which happened to be the Nikon S210 digital camera.  It takes pretty good video.

Then, I began the search for any video editing software on Linux.  I had created a video using Kdenlive a couple of years back, but I remembered it being a pain to use.

Long story short, after using about 6 other obscure video editing software programs for Linux, I came right back to Kdenlive.

To begin, the most valuable piece of advice I can give you at this time about using Kdenlive is this:

SAVE YOUR WORK EVERY 10 SECONDS.

Then you'll enjoy working with it much, much more.  Kdenlive will randomly crash, losing all unsaved work.  The crashes happen from 15 seconds, to 2 hours - man, it SUCKS losing 2 hours of work, so, save your work often.  If it does crash after a save, the saved portion of my work always came back without a problem.

Besides the totally random crashes (I worked on Kdenlive straight for 3.5 hours with no crashes, once), the biggest gripe I have about this program is the total inability to configure or manually modify the video format for the project.  You are limited to what the developers think you need.

For me, this creates a bit of a frustration because my camera shoots at exactly 30 FPS, not 29.976.  Well, there's no option for me to open a project where the video will work at 30 FPS, which makes me have to re-encode all my raw footage to 29.97, in order for the A/V sync to stay spot-on.

But the first item of business is to let you know how to start the program itself.  If you just type in "kdenlive" in a terminal, or click on it on some GUI menu somewhere, the MLT framework (upon which kdenlive is built) will default to PAL standards, which for people here in the good ol' USA, is no good at all.  Use the following command to begin the program, and it'll save you loads of headaches:

MLT_NORMALISATION=NTSC kdenlive

That'll help a lot.

the next necessity for good video editing with Kdenlive is to have footage which fits one of the pre-configured settings in the project.  If you don't, your video will look fine, but the A/V sync will drift, making the footage useless, and causing you to rip your hair out.

For me, since my footage is all at 30 FPS, I run the footage through ffmpeg to get it to 29.97, and then it works wonderfully.  Here's the command I use:

ffmpeg -i input_filename.avi  -b 10667.6k -r 29.97 -ar 22050 output_filename.avi

That should do the trick (at least for video recorded at 30FPS at 640x480).

After all my footage has been massaged to fit the requirements of Kdenlive, I then start the project and make sure the project video format is Square NTSC, which fits the precise resolution, and FPS of my footage.  I do this by clicking on Project->Configure Project, and then this box pops up:



From there, it's smooth sailin'.  You just edit your video like you normally do, remembering to save every 10-20 seconds.

When you're ready to export your masterpiece, you've got about 2000% more options than you do importing your footage.  This is good, and bad, as I've found half of them to completely mess up the exported video.

What I have found to work is the following:

I export the video by clicking on File->Export Timeline and then an export box pops up.  From there, I choose the "Medium" tab, and then mpeg4->640x480->High.  It looks something like this:



From there, I export my video (my last one was a 12-minute video and it took about 4.5 minutes to export).

After the export, I run it through ffmpeg once again to convert it to the correct resolution to fit in my flowplayer flash video player widget I use for this site, and then I'm done!

Here's the final ffmpeg command:

ffmpeg -i input_filename.avi -f flv -b 700k -ar 22050 -s 450x338 output_filename.flv.

And that, my friends, seems to work for me quite consistently.

Hope it helped.

June 09, 2008 10:33 AM :: Utah, USA  

June 08, 2008

Steven Oliver

RegEx that will save your life


I copy and paste a lot of code off of various websites and back into gVim. Which is all good but most of the time that copy and paste comes with line numbers in front of every line. While that might not be a big deal for 10 LOC or less, but for anything more than that your looking at a considerable amount of time wasted trying to delete all those lines, even with the dot command (pressing . in vim will repeat the last full edit series thing again).

So this is where regex and vim come to the rescue. You basically just do a find and replace using regular expressions.

%s/^[0-9]*\s//

That my friend will remove the line number from the beginning of every line. This does take into account two assumptions though. One, your line numbers are at the beginning of every line, and two, your line numbers always have at least one space after them. It will then replace all your line numbers with nothing. It basically just deletes them.

Enjoy the Penguins!

June 08, 2008 11:18 PM :: West Virginia, USA  

Brian Carper

Emacs pinky?

I worry about my hands. I play with computers for a living, and part of the reason someone would want to hire me is that I get a job done quickly. And being able to type fast is a necessary (not sufficient) ability for that to happen.

When I was in high school I started getting horrible pain on my wrists and hands. I had to wear a wrist brace for weeks at a time. I don't know what caused it, but too much keyboard time and bad posture and good old repetitive strain injury was and is my best guess. (This was before I'd even heard of Vim. Not sure what text editor I used back then. Probably some Notepad clone, ugh.)

But then I trained myself to type more comfortably, and I haven't had any pain for years. I hold my arms at the proper angle, and I don't bend my wrists or stretch or strain my fingers. My hands bounce over the keys nowadays, on and off the home row constantly. I don't use my pinky fingers to type at all, in fact. When I need to type a q or a number or a tilde, I move my whole hand up and hit it with my ring finger. When I'm vimming, I hit ESC with my middle finger. With practice this is just as fast as keeping your hands on the home row, but I find it far more comfortable. I still do it fast enough that people remark that I'm a fast typist (though I know plenty of people who are faster).

Thus we come to Emacs. Emacs is the king of key chords. I'm OK hitting Ctrl. I pick up my hand and hit Ctrl with the side of my pinky like I'm karate-chopping it with a half-closed fist, or use my pinky and ring finger both. The Alt key I can usually reach with my thumb. But anything that requires Ctrl + Shift or to a lesser degree Alt + Shift is a killer on my hands. I don't know a good way to quickly type Ctrl + Shift + another key in a comfortable way. Caps lock remapped to another Ctrl is the solution many websites list, but that doesn't cut it for me either, it's just pinky-stretching in another direction (and what do you do when you have to hit Ctrl with your right hand?).

For some reason I'm highly amused yet slightly horrified that there really is a condition called Emacs pinky. And that Richard Stallman and other Emacs gurus have famously experienced wrist injuries due to years of using Emacs. How many people in the world can say that their favorite text editor has physically crippled them?

Even if you admit that heavy dependence on the modifier keys is necessary, some of Emacs' keybindings seem ill-chosen to me. See this quote from the Emacs tutorial:

You can use the arrow keys,but it's more efficient to keep your hands in the standard position and use the commands C-p, C-b, C-f, and C-n.

I don't know what kind of creature finds those keys more efficient than the arrow keys or pageup / pagedown, but I don't think it's a human being. (But admittedly, same goes for hjkl in Vim.) Sure, you don't have you move your hands from the home row. You just have to contort them into pretzels. Try hitting up up up down left left right quickly, then try to do the same using those keys.

Same is true of other commands. delete-indentation, which I find myself doing a lot, is M-^. When editing Lisp you may get to experience wonders like C-( and M-J.

Anything multi-chord is also just a little bit torturous for me. How do you execute a command more than once in Emacs? e.g. move down 3 lines? You can either type M-3 C-n, which requires me to hit Alt with my right hand and 3 with my left, then hit Ctrl with my left and n with my right. Or you can do C-u 3 C-n, which actually requires me to alternate hands on the modifier keys three times instead of two. This for something so ridiculously simple as moving the cursor, something I do hundreds of times a day.

This kind of crap leads you to try to hit M-3 or C-u or C-n with one hand instead of two. If I can manage to hit M-3 with my left hand, I can hit the down arrow with my right. M-3 is possible with one hand, but M-8 or M-9 would not be without dislocating a few joints. Down this path leads permanent disability.

Sometimes I toy with the idea of remapping every keybinding or nearly every keybinding in Emacs to something sane. But aside from thoughts such as "Why the heck should it be necessary for me to do this?" or "Why would this possibly be worth my time?", I'm unsure I could come up with anything better. I'd still be limited to using lots and lots of modifier keys. Emacs has had decades of refinement after all, and it's still in this sorry state.

I have tried the Vi and Vim keybindings in Emacs, and they don't work right. They don't work in all buffers, for example a SLIME REPL buffer. Even when Vim mode is working, many of the Vim commands are present, but not all. These huge, massive Emacs-customization hacks always seem to work well maybe 95% of the time for me, but text editor bindings and behaviors are really something you need to work perfectly 100% of the time. Every time Emacs does something ridiculous or one of these third-party scripts mangles my buffer, and I have to kill and reload the file, it completely breaks my stride and throws off my concentration. The text editor needs to get out of your way and let you focus on what you're doing.

June 08, 2008 09:23 PM :: Pennsylvania, USA  

George Kargiotakis

Mobile view of the internet

This might be old news to most people but I didn’t know it… You can use a special google url to view websites like mobiles phones do. Try this for example: http://google.com/gwt/n?u=http://void.gr/kargig/blog/. It’s quite useful when you want to see how your site looks like from a mobile phone or when you want to use a browser from [...]

June 08, 2008 09:16 PM :: Greece  

Jason Jones

2008 - Roth Memorial - Friday

I just got done making the video for this entry, so take a look if you've got a high speed Internet connection.

Today was the 2nd day of the Ed Roth Memorial Reunion held in Manti, UT.

There were finksters-a-plenty there on Friday, but even more on Saturday.  I lost count of how many Rat Finks I saw.

So, because the days were packed, I didn't get a chance at all until now to compose a sufficient entry, but now the video is done, and I hope you like it.

To sum it all up, the main attractions of Friday were the car stripers which came from all across the country, the great food, Plan B's music (hehe), and the great looking cars.

We played pretty much all day today, and if I had to sum up our performance(s), I'd have to give them a C+.  The jam sessions (in my opinion) were A+, but we were so laid back, a lot of the attendees were confused at the music we played.

We have two sets of music, 1 hour each, and we played probably 3-4 hours of music.  Jam sessions with set songs sprinkled within.

Saturday's session was ..... way better.  We only got a couple of our songs recorded, thanks to horrible rainy weather by a professional cameraman, and I'll get the footage for it in a couple of days or weeks, but I'll get to that later.

Anywho, Friday was a great day, and is summed up much better in the video.

Oh, before I go, I've gotta say that for the past couple of days, I've been tinkering with the Linux-based video editing system, kdenlive, and although being far from noobie-friendly, I can say with pride that the whole video attached to this entry was created in gentoo Linux using kdenlive and the videos from a cheap Coolpix S210 "point-and-shoot" camera.  Professional quality?  Nope, but the a/v is in sync, and for a computer nerd, it was fairly easy to figure out.

I'll have to post a how-to on it later, because there's a slew of "gotcha"'s to get it to work right.

June 08, 2008 06:33 PM :: Utah, USA  

Thomas Keller

Ruby on Rails

I am currently working on getting into Ruby on Rails. Therefore, I wanted to install it on my server. It’s basically pretty easy - I followed the wiki entry; however, I did not use the “-D FCGID” option on apache, and I deployed the thest to /var/www/localhost/htdocs/test (and did not alter vhosts.conf, thus). Seems to work [...]

June 08, 2008 02:29 PM

Sean Potter

LinkedIn and BIOSLEVEL

LinkedIn is a social networking site for professionals. You won't go on there and find all the teenage themes, music, and video. Rather, you're able to add a single picture of yourself, and your profile focuses much more on your job experience, awards, and interests.

Colin invited me to join LinkedIn a few months ago, and I think it's been worth it. Mind you, it is free. I've established a network with several of the contacts I work with on obtaining review samples, as well as a few "corporate folk" from Buffalo Wild Wings. Not to say it'll grab me a new job in the near future, but anything helps.

I added a LinkedIn button to the staff profiles at BIOSLEVEL. It shows up on the "About Us" page right next to the person's name. Of course, not all the staff have it, as much as I'd like them to.

I wonder what Linux developers are on LinkedIn.

June 08, 2008 07:59 AM

Martin Matusiak

new word dialog

Suppose we had a dialog box for adding new words, what would it look like?

The age old tradition of mock dialogs continues…

Ps. Qt Designer on the whole is quite nice to work with, quite a bit better than Glade. Any gui designer is bound to be annoying, but I suppose Qt Designer is approaching the least annoying (and most effective) you can get.

June 08, 2008 03:04 AM :: Utrecht, Netherlands  

Bandan Das

Some more silliness

Based on my weird ideas, I cooked up a small scipt that will save me some time by automatically versioning new files that come up in my home directory. You "may/may not" have any use for it but if you want to have a peek, it's right here. Feel free to modify or use it for something else (that is weirder).

What it does : It compares and finds out a list of newly created files/directories, asks whether to add them (or ignore them) and then commits the changes and pushes it to my Amazon S3 drive. You will want to take care of the paths in there that are specific to my system.

Have fun!

read more

June 08, 2008 02:19 AM :: India  

Jason Jones

Last Three Days

I've been fighting with my computer for the past hour to get gentoo to import the contents of an SD card in a card reader (announces itself through USB as "07cc:0500 Carry Computer Eng., Co., Ltd"), and was unsuccessful.

As such, I have lost all motivation and energy to work on getting the journal entries for the 3 days of Rat Fink (Ed Roth) memorial reunion entered.  I've got pictures and videos of the cars, people, and music from the band I play in (Plan B).

I plan on getting some good day-by-day entries up, but it looks like it won't happen tonight.

I'm importing the images / videos through the camera now (with flphoto / gphoto2), and it's slow as frozen molasses.  So, as soon as it's done, I'm going to bed.

I'm exhausted.

Thank heavens for sunscreen.

June 08, 2008 12:13 AM :: Utah, USA  

June 07, 2008

Steven Oliver

Why C++ is “hard” in 2 sentences


One of the best quotes I’ve seen in a very long time…

In The Art of Computer Programming Don Knuth apologizes for not giving good examples of co-routines, because their advantages are not obvious in small programs. Many C++ features are like that in that: They don’t make sense until you face a problem of the kind and scale that needs that feature.

Bjarne Stroustrup

Enjoy the Penguins!

June 07, 2008 07:52 PM :: West Virginia, USA  

Luca Gasperini

Laptop ubuntu suspend and nvidia virtual tty

I decided to keep ubuntu even if I don’t like this new release ( hardy ) at all. When it came out it used to hang for no reason , the new kernels seem to have solved the issue.

I had two big problems, I couldn’t hibernate/suspend and I couldn’t switch to the ttys with Alt+F1 for example.

Starting from the latter I realized that the nvidia-glx package instead of the nvidia-glx-new does the job. Since I don’t know the difference between the two packages and I really don’t care to have the newest nvidia driver I consider this problem fixed.

Now suspend works and not sometimes or just one time like it used in the past, I had to change some config options in /etc/default/acpi-support

SAVE_VBE_STATE=false
POST_VIDEO=false
SAVE_VIDEO_PCI_STATE=true

Hiberating is still a problem or better waking up from hibernation is a huge deal on my laptop. It does hibernate and it tries to wake up during next boot but when X starts everything freeze. It seems a kernel or xorg problem because I can’t turn on/off the capslock led. Here’s the bug I’ve filled, hopefully someoene will look at it.

June 07, 2008 03:44 PM :: Italy  

June 06, 2008

Martin Matusiak

writing “she” just to be on the safe side

I won’t state this is common and therefore some kind of major concern. But I have been seeing this with increased regularity. Some people who write about an abstract and gender neutral person (eg. “the salesman”) will write “she” when referring to this person, apparently just to be on the safe side vis a vis sexism. This is yet another case of being concerned with the wrong issues and expending energy on things that don’t matter.1

If you are a reader who actually finds fault with use of the male pronoun to describe a non-specific gender neutral person, stop victimizing yourself (if you’re a woman) or stop sympathy-victimizing (if you’re a man). (See how I neatly handled both cases, I’m so politically correct.)

Guy Steele said it best, on a completely different subject, in his talk “Growing a language”:

To keep things short, when I say “he” I mean “he or she”, and when I say “his” I mean “his or her”.

But it really shouldn’t be necessary to make this qualification to anyone who can understand that use of a pronoun in a context where it appears incidentally is not a covert plot to put you down. Monty Python also had an elegant and hilarious contribution to this discussion in Life of Brian.

  1. Of course, this whole blog entry is just an example of that too, but I can still argue that I’m the only person arguing this issue while there’s many more wasting their energies on the issue at hand. :P

June 06, 2008 10:02 PM :: Utrecht, Netherlands  

Steven Oliver

Goosh


I just found this website called Goosh. Its basically Google overlayed with a fake bash like shell. While at first this was interesting, it soon turned stupid, only to then turn into something that might be incredibly useful. A lot of Linux, especially Gentoo, users have probably has to use Links or Lynx at least once in their life to search the internet because they could not get there system to boot into the GUI. A site like Goosh will make using Google from these (generally) text only browsers 10x easier! Long live the Goosh.

Enjoy the Penguins!

June 06, 2008 04:50 PM :: West Virginia, USA  

Matija Å uklje

Setting up wireless printing and scanning on HP All-in-One devices

Setting up a HP printer in GNU/Linux is probably a lot easier to do then any other brand — mostly thanks to the awesome HPLIP. This short tutorial will explain how to set up CUPS and SANE to use a HP All-in-One printer with the integrated wireless print server (e.g. HP Photosmart C4380), because there is a small caveat that needs pointing out.

read more

June 06, 2008 03:32 PM :: Slovenia  

Bandan Das

Coolest patch ever

So, I was recently talking to a colleague of mine who has spent a good number of years in the defense industry. As he was reminiscing the good old days, the conversation gradually drifted to a more interesting discussion about a guy who was a software developer: It was the cold war era and there was this critical monitoring system (with some version of MULTICS running on it) that needed an important kernel update. And the catch: the system can't be switched off even for a second and (probably) it was a core update or may be LKMs didn't exist then :)

So, our smart guy did something that no one had ever done in those times. He built a system with an exactly similar configuration and made whatever changes needed to the kernel. Then, he compiled it and came up with a binary diff between the changed kernel and the original one. The next step: Yes, you guessed it, he identified sections of the running kernel where there have been changes and set the non-executable bits on them (in the critical system). After that, it was just a matter of applying the patch. And there you are! the system stayed on as it always was :)

PS: I am really not sure how possible it is with today's OSes but I find the whole idea quite fascinating.

read more

June 06, 2008 02:54 PM :: India  

Jürgen Geuter

Gadgets, widgets, plasmoids, whatever you call them, they're pretty worthless.

Google released their Google Gadgets for Linux as open source. Those do even support both big toolkits (GTK and Qt) so they don't look alien in the user's environment, which is pretty neat. But let's make a few steps back first.

Those gadgets or widgets or whatever you wanna call them (everyone and their mom seems to have build their own little thingy there) are little apps that live on your desktop. They can display a calendar or a clock, they can grab some info from the internet and display it to you and there's also a lot of system information display widgets out there. What they have in common is that they are usually more about displaying stuff than about interaction.

Of course they do offer a context menu to configure them and often they do have a few actions that can be triggered by a click (like for example changing the volume or switching active application), but traditionally they don't have a lot of interaction (for that you would probably want a "proper" application anyways with all the flexibility it has).

Widget technologies are all about making it easier to create those "mini programs": The developer does not have to take care of much low-level code, you have a framework of the things you need and you can get your little application going in very little time and sometimes even platform independent (as long as the framework is platform independent).

So all in all it sounds really smart, right? All those neat little things doing stuff and showing other stuff? After all, a lot of the hype around KDE4 was based on the whole "plasmoid" idea (which is essentially the KDE flavoured copy of the widget idea).

Well, as it is so often, while it might sound smart, it actually is not. Let me outline why.

Widgets take up space. I don't really mean the one they take on your harddrive cause that one is cheap, but screen space. If you wanna have that information visible to you on your desktop you will try not to have your applications overlap the widgets because if you do, why would you wanna have the widgets in the first place?

And that is the real problem: Widgets steal your screen real estate.

While they might offer neat little information, you pay it with less space on your screen to put the things you actually need: The things you work with.

It's actually similar to having icons on your desktop: That's wrong cause when you open windows you wanna use your monitor to see the application you work in which means you won't be able to see the icons on your desktop. The desktop is not there to be cluttered with files (which, with any decent file-selector dialog) can be just as easily and quick be found when the reside in $HOME and if you put icons there to run applications you'll have to minimize what you are doing just to run something else (which is wrong on so many levels that I don't even wanna bother listing them here).

Widgets look nice on screenshots but that's all they are useful for. Look at all those screenshots full of widgets: Do you really think that, when you add the applications you work in, you'll see any of the widgets? Or do