Haha, this has got to be the simplest but elegant nerdy toy I have seen in a long time!

At work, my company issued me a Dell D620L laptop. For whatever reason, the touchpad moves the cursor painfully slow in Ubuntu (but not Windows). As a quick stop-gap measure, I just stick in a USB mice and use that. Today, I forgot my mouse so I decided that I’d look to see how I could fix it.

After some digging online for documentation, this is what worked for me:

  1. Open xorg.conf for edit (I found mine in /etc/X11/)
  2. Look under “synaptics” and add the following options
       Option	"MinSpeed"	 "1.5"
       Option	"MaxSpeed"	 "1.7"
       Option	"AccelFactor"    "1.8"
    
  3. Tweak these three numbers as necessary to suit your taste

Here’s a screenshot (click for larger):

ubuntu-touchpad-fix

I hope this helps anyone facing the same annoying problem I did.

On shameless-promo note, check out my cool wallpaper :p The scenery is a picture I took when I was in Grindelwald, Switzerland.

Cool stuff, Google has just lowered the barrier even further to mashing up Google Maps with any web page you have. All you do is go to Google Maps, pick your address, click on “Link to this page”, and cut-paste the HTML iframe code they provide you. Can it get any easier? Previously you had to register and get a Google developer API key and what not, and they were fussy about where the Maps could be placed, and so forth.

But now, you can cut and paste hassle free anywhere you wish! So here’s my first Google Maps mash into my blog. Here’s my favorite hangout place: Panera Bread. Why? Because it has a flat-rate coffee charge, and free electricity and wifi!


View Larger Map

I was messing around with some Javascript today, for use on a HTML form I was building. Here’s a simple code to present the user with a pop-up dialog box when they click a HTML form’s submit button, asking them “are you sure?”

<script type="text/javascript">
function confirmSubmit(){
  var r=confirm("are you sure?");
    if(r)
	  return true;
    return false;
    }
</script>

<form action="" onsubmit="return confirmSubmit()">
</form>

The Javascript confirm() function returns a boolean value, so test that value before proceeding to return true (proceed with form submittion) or false (halt the submission).

Update: I just got back from ice hockey practice, and over at practice, my hockey team member Scott asked what the purpose is of this blog post. The answer is, because this was what I did at work today. I was searching for a way to prompt a user after he/she hits the submit button on a HTML form. I don’t have a lot of code samples on my blog, although when I first started, I had thought of writing lots of technical howto’s with code samples. So I’ll try to write more of these types of blog posts. It’s mostly a matter of time, really. And oh, only the things that I _can_ reveal, such that it wouldn’t compromise my company, the Websense Security Labs. Or in any way infer what we are doing. We like to keep our labs a black box. Keep wondering :p