I had to implement an inactivity timeout on the web app I’m writing. Here’s how I did it:
You are currently browsing the archive for the computers category.
Tags: javascript, jquery
Just found something cool that I can do with Quicksilver on the Mac.
Normally, Quicksilver doesn’t index bin directories. In fact, you can’t even specify /usr in a path when selecting folders to search in. (Not sure where that limitation lies, perhaps with Apple). But the following bit of info on the Quicksilver site provided the answer:
You can also run Unix commands from the Command Window, and even pass arguments to Unix commands or shell scripts. To do this you need the Terminal plug-in.
If you want to run a Unix command, you need to make sure that the commands you want access to are scanned in the Catalog. Since Unix paths (like /bin and /usr/bin) are not shown in Finder, you can’t select the path to the Source in the Catalog using the normal method (see Catalog). However, there is a trick to allow you to do it. Click the ‘+’ button at the bottom of the Catalog window to create a new source. For now, select any folder in the Open dialog. Open the information drawer for the new item by clicking the ‘i’ button. Choose “Source Options” from the drop-down menu. The panel directly below the label “Path” shows the path of your Source, but what isn’t obvious is that this path is editable. Click in the panel, type the path you require (for example, /usr/bin) and press Tab to enter the path.
Now you can access Unix commands in the Command Window:
- Activate the Command Window, type a shortcut to find the command (for example, top to find /usr/bin/top, and press Return or Enter.
- A new Terminal window opens running your command.
To pass arguments to a shell script or Unix command:
- Activate the Command Window, and type a shortcut to find a shell script or Unix command (see previous steps).
- Press Tab and choose Run [with arguments].
- Press Tab again, then enter text mode and enter your arguments in the text box in the third field.
- Quicksilver executes your command, and places the output in a text clipping in the first field for you to do with as you wish.
Command-line devotees will immediately be able to see the amazing potential of this feature. One word of warning though; don’t try to use Run [with arguments] on an interactive command that doesn’t exit until you tell it to. For example, if you pass arguments to top in this way, it will output the first lines to a text clipping and then hang waiting for input, so that you will have to kill the process manually. Remember – always practice safe command-line techniques.
See, the key that makes this work is something which is here-to-fore hidden in Quicksilver. It is not at *all* obvious that the Path field is editable!! (It just looks like a normal label.) Anyway, score one more for Quicksilvery Productivity Goodness.
Now I can easily use my todo list manager, the ever helpful [todo.cli](http://lifehacker.com/5155450/todotxt-cli-manages-your-tasks-from-the-command-line) written by the ever wonderful Gina Trapani.
At the Max Plank Institute for Biological Cybernetics (that name is WIN alone!) they’ve created a Giant robot arm used as F1 simulator !! It looks most fun, but don’t hold your breath waiting for one of these to show up at an arcade anytime soon (or for that matter, to arrive in homes — this ain’t your usual PS3!). There’s a very cool video on the site showing what it can do. Like the OP, I noticed a lag in the movement of the arm compared to the actions of the operator. This surely will get better with time, though. But just imagine!! Hanging up there in space supported by a giant robot arm running a driving simulation. That has all sorts of win written all over it.
Tags: robots
I redesigned my desktop using GeekTool to make it pretty and inspiring. Here’s a screen shot:
Tags: GeekTool
has the large hadron collider destroyed the word yet?
Tags: large hadron collider
I got an Eeepc 4G in Pink that I’m using for a communications device.
![]()
![]()
![]()
I’m planning on keeping the Xandros distro on it and not do anything particularly fancy with it.
First thing i did was add some additional repositories to /etc/apt. I added the following repositories:
deb http://xnv4.xandros.com/xs2.0/upkg-srv2 etch main contrib non-free deb http://dccamirror.xandros.com/dccri/ dccri-3.0 main deb http://www.geekconnection.org/ xandros4 main deb http://download.tuxfamily.org/eeepcrepos/ p701 main etch
Second thing I did was install screen(1). How could they leave off this Tool of the UNIX GODS!!!
Third up is getting it to work with my Treo 700p over the USB connection. After that, I’ll tackle getting it to work with the 700p over bluetooth.
There isn’t any real documentation on how to set up the 3epc over USB phone. I’ve had to scratch out information from friends and the internet as best as I could. Best thread so far is http://forum.eeeuser.com/viewtopic.php?id=1127 (both pages). I’m also finding good templates from the USBModem site (http://www.mobile-stream.com/usbmodem.html) even if I don’t need their software (I bought Sprint’s Phone-as-Modem plan).
I needed to make sure cdc-acm was installed. I added cdc-acm to the end of /etc/modules and rebooted.
Go back to Network Connections, try to add a new dial-up network, and…… the phone reboots! ARGH.
Ok, turns out I didn’t need cdc-acm. I needed a utility called USBModem which sells for $25 that runs on the 700p. WOOOT! IT WORKS!
But it’s not perfect. As per http://forum.eeeuser.com/viewtopic.php?id=21392, I edited the file /etc/ppp/peers/dialup1 (created by the network creation program) and added the following two lines:
lcp-echo-failure 4 lcp-echo-interval 65535
Unfortunately, the network still seems to time out after about 10 seconds of no activity, so I launched a ping to yahoo.com to keep it open. I hope they don’t mind too much.
One of my adopted daughters in Australia collects old computers:











