Web blog.revragnarok.com

Welcome to RevRagnarok's Blog

This is not a typical "read my thoughts blog" - instead it is a "I found something that may be useful to be jotted down for myself, and maybe others can benefit from my sweat and tears." So it is more of a brain dump. If you find any of it useful, please feel free to drop me a line at blog using this domain name. Also, most of my useful links are dumped at del.icio.us. And with that disclaimer finished, I now have a "funny stuff, etc" blog on blogspot.

Tags that will help you navigate:

If you find this page helpful, please consider checking out HowToSupportRevRagnarok.


TEN NEWEST POSTS


<<  <  Nov  2008  >  >>
Su Mo Tu We Th Fr Sa
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            

VMWare Client Running on Fedora 9

What a pain! You have to get the latest open-vm-tools from SourceForge. Do a configure and make && make check. But then you cannot actually install the files or VMWare gets pissy.

After the make you need to pack up the kernel files you have created and patch the real VMWare installer with them:

for i in *; do mv ${i} ${i}-only; tar -cf ${i}.tar ${i}-only; done
cp *tar /usr/lib/vmware-tools/modules/source/

Then you can run the standard vmware-tools-config.pl and it will use the source you just upgraded.

This page was assembled from various net resources...


Hidden Directories

So, apparently Vista does something that is actually kind of smart. If a program tries to put preference files, etc into the "Program Files" directory, it dumps them elsewhere so that they are still going to be user specific. (This is all hypothesis!) Anyway I was trying to move my scores from WinXP to Vista for "Snoodoku" and this was the solution. http://www.wordofmousegames.com/forums/showthread.php?t=2134


Well, I found it myself, so figured I'd post the solution for future users.

Apparently, Vista merges two directories when a program is trying to store preference files in the Program Files directory. So the file was actually hidden away in C:\Users\RevRagnarok\AppData\Local\VirtualStore\Program Files\Snoodoku


More info from Microsoft.

Updated on 10/07/08 07:08:34


Car Repair Pricing

http://consumerist.com/5032351/demystify-car-repair-prices-with-repairpalcom


Service Manuals for a BUNCH of stuff

http://www.eserviceinfo.com/


"sudo" for Vista

http://technet.microsoft.com/en-us/magazine/cc162321.aspx

"elevate" acts as sudo

Updated on 10/03/08 08:43:20


Subversion from Perl

So I spent about three hours trying to get my perl svn_compress script running and I ran kept running into the damned thing segfaulting!

svn_path_basename: Assertion `is_canonical (path, len)' failed.

I finally found the answer. Apparently, libsvn wants '' as the current directory, not '.' like every other program since the beginning of time (Jan 1, 1970, right?).

Three hours.

Where I read the answer. Pasted here:

Peter Samuelson wrote:
> [Julian Gilbey]
>> burnside:~/debian/tex/tetex-bin $ perl -MSVN::Client -e \
>>   'sub print_names { print "<$_[0]>\n"; } $ctx=new SVN::Client;
>>   $ctx->status("", "BASE", \&print_names, 1, 1, 0, 1);' | head -5
>> <>
>> <.pc>
>> <.pc/.version>
>> <configure>
>> <INSTALL.generic>
> 
> I reproduced your bugs with subversion 1.3.0-5, so I can properly
> discuss it with upstream.  Unfortunately, I don't know much about the
> Perl bindings.  But comparing "svn status" with your command, it does

(...)


Today I created a yum repository

This is what happens when you are at work and you have ISOs for the 6 CDs of CentOS 5.2 but NOT the DVD, and no connection to the 'net... I couldn't use the 5.2 installer thanks to this bug (it's an embedded Celeron 650). Since I went thru all the work, I also then imported the directory as a "shared folder" under VMWare player and then did the same upgrade path on that machine (I want it to mirror the embedded machine for all versions of everything, except it also has the gcc suite, etc).

One Time Only

(This can be done on any Linux machine with the external drive connected)

  • I mounted the external drive under Linux and there are the 6 ISO CDs. I mounted each and then upgraded what was on it that we already had installed.
  • cd /media/ext_drive/<install dir>
  • mkdir mnt
  • mount -o ro,loop <CDFILE>.iso mnt
  • cp -urv mnt/CentOS .
    • If I were doing this again, I may mount the 6 as /mnt1 thru /mnt6 and then try to use cp -l to make links?

(...)


Stopping a Windows Executable from Running

To prevent a file from being created, in the past I have created a folder with the same name. This lets you stop a file from running (the example used is a worm executable):

1. Create a registry key with the name of the process you want to prevent to execute. Ex.: calc.exe

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\calc.exe 

2. Under this new key you've just created, create a SZ value called "Debugger" and set it to the following value:

SZ Debugger = "cmd.exe /c echo  %time% %date% calc.exe >> c:\ExecBlocked.log"

From http://blogs.technet.com/marcelofartura/archive/2006/10/24/a-virus-infection-contolling-the-outbreak-tip.aspx with slight mods by me.


Random Unix/Linux Tips

Yeah, that's pretty much the subtitle of this blog, but I found another that has similar stuff:

http://users.softlab.ece.ntua.gr/~ttsiod/tricks.html

My favs (I'm copying in case the site goes down):

Convert a static lib (.a) into a dynamic one (.so)

gcc -shared -o libXxf86vm.so.1.0 \
	-Wl,-soname,libXxf86vm.so.1 \
	-Wl,--whole-archive,libXxf86vm.a,--no-whole-archive

Create PNGs from a pdf presentation

gs -dSAFER -dBATCH -dNOPAUSE -dTextAlphaBits=4 \
    -dGraphicsAlphaBits=4 \
    -r85 -q -sDEVICE=png16m -sOutputFile=icfp-pg%02d.png \
    PhDPresentation.pdf

Read a damaged CD/DVD valid parts and get the rest with rsync

As is often the case, when I bring some burned CD/DVD 
from work, I find out that its bad at some offset.
I came up with this Perl script:

---------------------------------------
#!/usr/bin/perl -w
use strict;

my $i=0;

select((select(STDOUT), $| = 1)[0]);

(...)


"Hidden" Search Feature in File Open dialog

OK, I've been using Windows for years and I really thought I knew almost every shortcut. I Alt-Tab like there's no tomorrow (and occasionally remember to Win-Tab on wifey's laptop w/Vista). Win-R hourly (typing cmd or calc is quicker than finding it on the menu). Win-E any time a USB drive is nearby. Anyway, apparently you can do searches within a "File Open" dialog. Obviously, I knew most programs add a pull-down with file types. But on a whim, I was in UltraEdit the other day and type *vhd and wow it limited the selection to the VHDL files. *.v worked too, but acted like *.v* - however *.l and *.l?? showed the second one acting as I would expect (matching only 3 letter extensions starting with l - .lock was hidden). I tried it in a few other programs like Gimp and it seems to be part of the standard Windows UI. This is XP, I don't have access to any 2000 machines anymore, but no idea when it came about. (As shown before), I hate it when something I'm looking for is right under my nose!