Windows command of the week: “netsh winsock reset”

I discovered this fascinating command when trying to fix Kat’s computer.

Originally it showed a completely empty desktop with no icons or taskbar, just the wallpaper, even in so-called “Safe Mode”. A rollback to the last known good configuration solved this, but the networking still wouldn’t work. The DNS resolved domain names as garbage, some even containing bell characters that made the machine beep.

I tried uninstalling the driver for the network card and rebooting, at which point the DNS just stopped working altogether. The “ipconfig /renew all” command failed saying that “No adapter is in the state permissible for this operation”.

A quick Google search for this error message (using my handy palmtop that happened to work with Kat’s wi-fi) turned up a MSDN article that basically said: “Shit happens, type ‘netsh winsock reset’ and reboot”

And what do you know, it worked 🙂

Wisdom teeth, who needs them?

My dentist seemed to think I’d be better off without mine! So after almost a year on the waiting list, I finally got all four of them extracted at the Glasgow Dental Hospital. It was a gruesome process that involved drilling holes in my jawbone to get the impacted ones out. However, I wasn’t really caring, since they sedated me with Midazolam first. It is pretty good stuff! It’s supposed to cause amnesia, but I definitely have a vague memory of things getting drilled and yanked. I don’t remember getting injected with the local anaesthetic, though, which is usually the part I hate the most.

What I wasn’t prepared for, though, was just how much it would hurt afterwards! About a week after the operation, the empty sockets started to hurt bad enough to keep me awake all night and generally not be a nice person to be around! Apparently I had so-called dry socket, which actually means “Bits of bare jawbone that need washed every few hours to prevent infection”.

So, if you’re having your impacted wisdom teeth out, here is a shopping list of things you might find useful.

  • Soup. Lots of soup. Bananas, porridge, yoghurt and scrambled eggs are good too. Don’t try drinking stuff through a straw, though!
  • Ibuprofen and paracetamol (seem to be the best painkillers for the job)
  • Corsodyl or a similar antiseptic mouthwash
  • Dental mirror and flashlight (if you have a morbid sense of curiosity)
  • Squeezy bottle or large syringe with a rubber tube attached. If you got the dental mirror and flashlight, you’re going to want this too, for hosing the now-visible lumps of food out of your socket holes, before they go septic…

Anyway, enough of this, ugh! 😛

NHS Direct on wisdom teeth
more from the University of Manitoba

Nix command of the week: tail

If you’ve messed around with Linux, you might well have used the “tail” command. All it does is print the last few lines of a file. For example,

tail -n 10 /var/log/apache2/access.log

will show you the last 10 pages that the webserver served. (Assuming you’re running the 2.x version of Apache.)

But for extra geeky thrills, the -f option will make tail watch the file and print out any new lines as they appear. So:

tail -f /var/log/apache2/access.log

will print out whatever Apache is putting into the log file as it is putting it in. Handy for keeping an eye on log files when you’re debugging stuff.

You can crank the geeky thrills up another level by pipelining it into something else, like our old friend from Unix school, grep. For instance,

tail -f /var/log/apache2/access.log |grep sheep

will alert you whenever anyone tries to access a page with “sheep” in the filename. How useful!

PS: press Ctrl-C to exit.