Home

13 aoû 2006

purple WH

Configuration

I've spent the day lying around doing not much of anything. On [info]the_archange1's recommendation, I watched the entire first season of The IT Crowd. (The site is interesting in that people outside the UK are not allowed to access the show clips.) Very funny show and worth a download.

I also played around with configuring my computer some to solve some problems. McK has been coming over after the gym and I'll rub her back while she relaxes. I like to watch TV while doing this, but for her, I want to play music. Well, my machine has two soundcards in it: an Audigy 5.1 channel card for my speakers and then an onboard NVidia chip. It turns out that if I just pass -ao alsa:device=hw=1,0 to MPlayer, it'll pipe the sound to that other card so I can listen on headphones. Handy.

I've also been irritated that all the fancy keys on my Natural Keyboard don't work. Unfortunately, xev revealed that about half of them don't even result in keycodes getting sent in. I did however modify my config using xmodmap to get the forward and back buttons working for Amarok.

Tags:

07 oct 2005

purple WH

Storage

Gonna leave soon and am probably going to abandon my rapidly decaying laptop. What to use for storage?

About $100 for each. The 5gb versus 1gb would be nice, but I love the idea of being able to throw the thing at the wall.

Tags:

06 oct 2005

purple WH

99 Problems

I've been laid up with a really bad earache for the last three days. Last night it proved an interesting backdrop to a little adventure that ended with the disappearance of a pound of butter and the death of a mouse. That though is a story for later…

Right now I've made it out of the house and have been fighting with projects for people here at the bureau. Project #1 is take a winamp playlist and burn it onto a CD. I had a couple to do for people who are leaving, so I wrote a little script:

programation )
Project #2 )
Tags:

24 juin 2005

purple WH

Google Rox My Sox

I was trying to help a friend with a mail problem and I noted in Google's FAQ that in addition to providing POP access, they also permit SMTP forwarding. Sweet!

This means that I can send mail using Thunderbird. I like gmail's interface just fine, but for popping off a quick reply, doing HTML messages or writing in French, Thunderbird had its advantages.

I've not been able to use it because though STARTTLS is enabled on both the honors' server and stderr, they won't let me connect because none of the addresses in this country have a PTR record. I also can't run my own server here because our entire IP block has (rightfully) made it into a couple blackhole lists. So, I've been limited to web interfaces for the most part.

The neat thing is that gmail takes all the messages I send through it and threads them with existing threads if appropriate. The timing can get a little off, but all in all I end up with a single coherent thread regardless of if I replied using gmail's interface or Thunderbird. That attention to detail is what I like about the Google folks.
Tags:

22 juin 2005

purple WH

Balance

I've slept twenty hours in the last three days, but none in the last twenty four hours since I've been sitting in my lab for that long piddling around. Does erratic alternation between extremes count as a type of balance? Sort of like a seesaw with two big ass rocks at either end?

Internet Explorer sucks, btw. You can't pull nodes out of a DOM tree loaded via XMLHTTP and insert them into the main document. This means that if you want to pull in chunks of other HTML files you are shit out of luck. Also, getDocumentById is not defined for XMLHTTP objects. I ended up writing a wrapper around the XPath functions to get the nodes I needed. Not that it turned out to matter since I couldn't use the nodes anyhow.

It has been a struggle and it is far from over. The basic animation components are starting to work, but all the dynamic stylesheets are munged. It is a real pain. I was hoping to have something to send to the invitees before they came, but that is looking iffy since I have actual work to do.

Anyhow, off to sleep for a couple hours before coming in to teach tonight. I did a conference call yesterday with me in Mauritania, a guy in South Africa, someone in New York and someone else in Texas. It was convoluted to say the least. We've got some money missing from the last course and quite a bit of equipment from when the Academy started. We're getting along though. I've been feeling better teaching this time. An hour spent looking up the terms I'm going to need in French does wonders.

Off to bed…

10 juin 2005

purple WH

Slideshow

If any of you use Firefox or Mozilla, go take a look at my slideshow. The username (to load the mp3) is slideshow and there's no password. If you use IE, it'll be a bit. I use a hell of a lot of javascript and I'm dealing with irritating scoping differences.

06 juin 2005

purple WH

ECO-Développement

Well, we got the EcoDev page done today. I've been working on it with another volunteer for about a month now. It feels good to be able to check a project off the list. That doesn't happen all that often. I've worked about twenty four hours in the previous two days on the slideshow project, but it still doesn't work. I want to get it going for our new invitees who are coming in next month.

I think I'm going to hang around a bit longer, but try to avoid leaving at 2am, like the last two nights. Being at work all the time has made me quite anti-social as of late. I've been feeling productive though and I hate to waste it.

Anywho, back to work…

22 mai 2005

purple WH

Resizing

Script du jour: any images larger than 640x480 should be sized down to fit within those bounds:

W=640;
H=480;
for file in *; do
  info=$(identify "$file" | sed -e 's/.* \([[:digit:]]\+\)x\([[:digit:]]\+\) .*$/\1x\2/');
  if [[ ${info%x*} -gt $W || ${info#*x} -gt $H ]]; then
    echo "Resizing: $file";
    ext=${file##*.};
    convert -resize ${W}x${H} "$file" "${file%$ext}sized.$ext";
  fi;
done
Tags:

27 mar 2005

purple WH

Quizzes

As I mentioned a couple days ago, I made an account on a quiz site, okcupid. I've been piddling around and have since taken two geek tests and have not been satisfied with them. In fact I've mailed the authors of both of them because I thought there were errors.

The first one had:

Alright, which command would you use to copy a file:

  1. cp syn@cheese:/cheese /cheese
  2. scp /cheese:syn@cheese /cheese
  3. ssh -lsyn cheese
  4. ???????????????????????????????

As root on a Linux box I can run:

mkdir syn@cheese:
touch syn@cheese:/cheese
cp syn@cheese:/cheese /cheese
touch /cheese:syn@cheese
scp /cheese:syn@cheese /cheese

Which means either #1 or #2 is a legal way to copy a file. I'm not even really sure which one the author wanted to be the right answer. I would guess #1, maybe? Assuming that he didn't know that the scp command does a local copy if there is not a valid host part at the beginning. I dunno. He never responded to my message.

The second test had:

public void Compute(int x) { try { int foo = 1024/x; foo = 1; System.out.println(foo); } catch(Exception e) { System.out.println("22"); } catch(DivideByZeroException e) { System.out.println("Error 1"); } }

What's the output of Compute(0)?

  1. 0
  2. 1
  3. 22
  4. Error 1

This one might be fine. I don't know for sure what language it is written in. The System.outs suggest strongly java, but DivideByZeroException doesn't exist in java and it does in .NET. Even if it did, you can't have a try block which catches a superclass (Exception) before a subclass (DivideByZeroException), so this isn't valid java in any case. I don't know .NET and don't have a compiler to test.

So, on this one I'm not sure. I'm still waiting to hear back on what language it is supposed to be.

I heard back from the guy and he told me he knew it was not valid. He just hasn't had time to fix it yet. He said he was shooting for people to pick 22.

Regardless, I've not really been entertained by either of them. I'm wanting to write my own real geek test. I was wondering of the geeky among you, what would you put on it? I'm wanting to try and get some broader conceptual stuff so that someone can't just google an answer.

What are the destination MAC/IP in a DHCPSOLICIT serviced by a DHCPv6 relay agent?

  1. the DHCP server's MAC / 255.255.255.255
  2. FF:FF:FF:FF:FF:FF / FF05::1:5
  3. FF:FF:FF:FF:FF:FF / No IP (ethernet broadcast)
  4. the relay agent's MAC / FF02::1:2

That question is one that just looks complicated. If you know what DHCP does, then you can answer it. It is used for a machine to get initial configuration information. Looking at the name of the packet, SOLICIT, you might correctly guess that this is the first packet sent out to find which DHCP servers are on the network. That eliminates #1 and #4 since both of those use a known MAC address. The machine doesn't know any addresses though because it isn't configured to be a part of the network yet. #3 can then be eliminated since DHCP is a UDP protocol (i.e. layer 3, so it has to have a layer 3 address). That address is the broadcast (255.255.255.255) in IPv4 or the multicast FF05::1:5 for IPv6 which, as you might guess, DHCPv6 covers.

So someone has probably a 75% of guessing this if they're just slightly geeky. A more difficuly class would be something so arcane you aren't going to find it on the web.

What command will locate a file somewhere below the current location on a VMS system?

  1. find $(pwd)/./ -name filename
  2. ls --recurse | grep filename
  3. search [-]filename
  4. write sys$output f$search("[...]filename")

Don't know? This one is trickier. The first one is a valid, if convoluted, way to do the operation in a bash shell. The second is a trickster because it would work in a bash shell except the argument is recursive and not recurse. It is there to trick people into thinking they found the trick and going with the first one. The third one is just made up. It includes the DCL representation of the current directory just for kicks. The last one is the right answer. How you going to get that? That's what separates the men from the boys. ☺

I want more stuff like the first one though. Stuff that a geek ought to bed able to figure out if they've got the background. Putting really arcane stuff on there really just tests what people have run across. My first mainframe was gemini. That it was running VMS was just happenstance.

I need to cover the classes of geekiness. I think there's a difference between a geek (someone fascinated by a subject) and a dork (someone socially maladjusted) and a nerd (someone who is intelligent). I've got a friend here who is a music geek. He knows a shitton about indie groups and he is really snide about it at times. He is a geek about music in the way I've got friends who are about computers or chemistry or whatever. So I want information questions more so than, "was canceling Enterprise a travesty?"

Does anyone have any good math or science sort of questions? Maybe internet culture stuff? (googlewhacking, whitehats, war chalking, etc.) I need some gradated questions too. A common one is what OS are you running or what is your MUA.

09 mar 2005

purple WH

Buts

I've been spending the day spinning my wheels pretty much. I'm trying to get the firewall configured for my lab, but every time I make a little progress I hit another wall. Right now the perl script for adding users to the samba domain controller is choking on the unicode characters in the LDAP distinguished name. Doesn't that just figure?

Anyhow, I've also been ramping up to finish our semester one class. I was hoping to do it tonight and I told all the students we would be, but in looking at the info I'd have to cover it just isn't going to happen. I'm really not sure how this is going to work out. I've got a couple really good attentive students who have been coming to class. It really does make a world of difference to have at least one or two students who come to class and seem to give a damn.

For the others, I don't know what to do other than fail them. People can usually manage to squeeze by here, but this time it is going to be tough. I don't decide on the curriculum and I don't make the exams. There really is a huge amount of information to learn. I sent the lists of goals to them today to maybe put a bit of a scare into some of them and get them to come to class.


Les Buts de Cisco Semestre 1 )

08 mar 2005

purple WH

Balance

I've been looking back over my entries and it appears that I do nothing but party anymore. This is only mostly true. I do occasionally pretend to be mildly productive. For example, today and tomorrow I am finishing up my semester one class. I need to write out my prep for tonight and I figured I'd do it here to demonstrate that I am occasionally productive. I also find it interesting, and perhaps the geekier among you might be of accord.

It is written in my horrible excuse for French and I apologize to the entire nation of France ahead of time for the butchering. I can't spell for shit because so many French words have silent consonants at the end and I almost exclusively speak. I'll get a dictionary and fix it up later…

Qu'est-ce que se passe sur le réseau quand vous démarrez votre ordinateur )
Tags: ,

24 jan 2005

purple WH

Exporting a Livejournal

[info]titivillus asked me about something I mentioned about creating a cron job to archive livejournal posts. The process is something that takes a little specialization to be familiar with, so I figured I'd document it publicly.

This little shell script ought to do the trick. It uses curl to do the posting and save the cookies and whatnot. Very handy little program that.

[ -z "$USER" ] && read -p "Username: " USER
[ -z "$PASS" ] && read -p "Password: " PASS
curl --cookie-jar /tmp/cookie.tmp --data user=$USER\&password=$PASS \
    --output /dev/null --silent http://livejournal.com/login.bml
[ -z "$MONTH" ] && read -p "Month: [1-12] " MONTH
[ -z "$YEAR" ] && read -p "Year: " YEAR
FIELDS="year=$YEAR&month=$MONTH&format=xml&encid=2&header=1"
for field in itemid eventtime logtime subject event security allowmask currents; do
    FIELDS="$FIELDS&field_$field=1"; done
curl --cookie /tmp/cookie.tmp --data "$FIELDS" \
    http://livejournal.com/export_do.bml?authas=$USER
curl --cookie /tmp/cookie.tmp --data user=$USER \
    --output /dev/null --silent http://livejournal.com/logout.bml
rm -f /tmp/cookie.tmp
purple WH

juin 2008

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Publicité

Syndicate

RSS Atom
Actionné par LiveJournal.com