I run Vista at home primarily for gaming purposes (and I like uTorrent). One of the problems I had with it lately was it not turning off the monitor when the power saving plan was supposed to. I would watch it try and turn off, but usually wouldn’t quite succeed. Eventually I determined the problem was having the screen saver set to activate at the same time the monitor was supposed to turn off. I set the screen saver to activate 1 minute earlier and everything is now working correctly.
OpenDNS kills Google
Yesterday I was having problems getting to Google. The rest of the internet worked fine, but I couldn’t connect to Google. It struck me as unlikely that Google would be down and check with Down for Everyone confirmed that it was just me.
After much digging and a bit of thinking, I discovered google.com was not actually resolving to google.com. It was resolving to an OpenDNS service. Apparently they do some proxying of Google to make sure some of their advanced features keep working. To fix the problem, I just had to turn of the proxy and everything was golden.
To turn of the proxy:
- Login to OpenDNS
- Go to Settings
- Go to Advanced Settings (the link is on the left)
- Turn of the proxy
- Enjoy
Adobe Air in Jaunty (Ubuntu 9.04)
I just finished reinstalling Ubuntu 9.04 and was trying to install my air applications. Not terribly difficult…
- Download the installer from: http://get.adobe.com/air/
- Install ia32-libs
- Install lib32nss-mdns (from http://tr.im/jCFs )
- Install your apps
I got stuck on the third step when I was going through things. I could install Adobe Air applications, but they had no network access. Installing that library corrected the problem.
Arch Linux
I decided that I would like to try a Linux distro that was less “do it all for you.” After consulting with the people I consult with on things like that, I decided to try out Arch Linux. So far I am pretty impressed. It is definitely a DIY distribution, but they have documentation to help you through just about everything.
I am running it on an Acer 5672 laptop. I will post here with possible problems I find and any solutions…
- Special keys (Play/Pause, Stop, Volume, Mute, etc)
- Install keytouch
- Download the Aspire5670 Keytouch File
- Run keytouch and import the downloaded file
- Card Reader
- Run the following command:
sudo setpci -s 09.0 4c=0x22
- Run the following command:
- Webcam
- Add gspca_vc032x to your modules list in /etc/rc.conf. You can also just modprobe it to test. If compiz is enabled, the picture will flicker unless you modify your xorg.conf.
Section "Device"
........
Option "VideoOverlay" "off"
Option "OpenGLOverlay" "on"
Option "TexturedVideo" "off"
.........
EndSection
- No Automounting in Gnome
- Make sure your /etc/fstab file does not contain entries for the cd/dvd drives. Removing those had it working immediately for me
PHP Script for Deleting Orphaned Images
The title for this sucks. But that is because it isn’t easy to concisely describe (in a title fashion) what the script does. Imagine you have a lot of pictures from a photo shoot in both tif and jpg formats. You pick out the jpgs you want to keep and delete the rest. You still have all the tifs and want to delete the ones without a corresponding jpg. This script will do that. It takes three arguments: directory to delete from, directory to base that on, and an optional backup directory to move instead of deleting.
If you want it to handle different extensions, edit the code where it says jpg and tif
#!/usr/bin/php
< ?php
$deleteFromDir = rtrim($argv[1], '/');
$basedOnDir = rtrim($argv[2], '/');
$backupDir = rtrim($argv[3], '/');
if(!empty($backupDir) && !file_exists($backupDir)){
if(!mkdir($backupDir)){
dir("Unable to create backup directory. Quitting\n");
}
}
$dh = opendir($deleteFromDir);
if($dh){
while(false !== ($file = readdir($dh))){
if($file[0] != '.' && !empty($file)){
$info = pathinfo($deleteFromDir . '/' . $file);
if($info['extension'] == 'tif' && !file_exists($basedOnDir . '/'. $info['filename'] . '.jpg')){
echo $file . "\n";
if(!empty($backupDir)){
rename($deleteFromDir . '/' . $file, $backupDir . '/' . $file);
}else{
unlink($deleteFromDir . '/' . $file);
}
}
}
}
}else{
echo "Unable to open $dir\n";
}