So Winucking funny, it’s pitiful !!!

I honestly don’t know if I should laugh or cry, it’s really that bad but I’m laughing my ass off right now lol.

Like last week I set up Microsofts Services For UNIX 3.5 on my XP machine, configured user/group maps from my Windows XP user account to my account on the OpenBSD server with the NFS shares. I followed the documentation that came with the software to get it set up.

If I try to access \vectrasrvnfs through Windows Explorer I either get an error message or I get the files, or I get BOTH. And trying to even right click to highlight any thing in Windows Explorer causes lock ups for several seconds. If I use the IP address rather then the alias ‘vectra’ that I setup in %SystemRoot%System32Driversetchosts it works slightly faster if I try to use the dir command in the command prompt which is stupid.

When I try to map the share to a network drive in Windows Explorer it dies with an error at \vectrasrvnfs, but I can ‘browse’ for it and then use it some times. It also ignores the maps I set up in the graphical SFU admin program so I can’t access files — and still buggers up when I tell it the login datam.

So finally pissed off after a week of this lag & lock crap, I open a command prompt with SFU’s shell and check the mount commands documentation which tells me to use the Windows Uniform Naming Convention (UNC) syntax for the file paths.

mount \vectrasrvnfs N:

And I get an error message about \vectrasrvnfs being an invalid command line argument to mount. So I for the hell of it I try the unix style host:share syntax to see if that works.

mount vectra:/srv/nfs N:

and BOOM it friging works !!!

I open windows explorer and go to N: in the nav bar and it works QUICKLY just like the NFS Shares mounted on my PC-BSD system do. Now my NFS shares are working through Windows Explorer properly, not like a piece of garbage as it was when doing through the GUI on Windows.

THE IRONY OF IT ALL !?

Microsoft Windows is noted by some people for giving easy, graphical ways to do things that ‘unix’ systems are supposed to lack quality documentation.

I used the ‘easy’, ‘graphical’ interfaces in Windows to do what takes 2 seconds in Unix which is ‘supposed’ to lack documentation and it works like shit or not at all in Windows.

I used the ‘hard’, ‘command line’ like way on Windows, only to find that the ‘supposed’ good documentation is wrong, and guess what — Doing it from the command line on Windows works ____better____ then the GUI once you figure it out.

Time to roll on the freaking floor laughing until my sides hurt !!!!

Well, it’s been almost 4 hours or more since I took a ‘break’ from SWAT4… A few min to lay down, then get back to work was the plan.

Family has such a great way of fscking you over, don’t they?

Writer’s Block: Define Cheater

What is your definition of cheating?

Live Journals Writer’s Block

Hmm, guess it depends on the subject.

Strangely when I’ve got to use mg or emacs instead of vim/vi for some thing I often feel like I’m cheating on an old friend… LOL

Generally I define cheating as unfair advantage, being able to fire 2*as fast for example or shooting through walls, spawn raping, etc.

And as to the ‘other’ kind of cheating that comes to mind — not worth doing.

Groaning spider

So flib’n tired….

Ma is pissed off because the A/C isn’t running a lot, so she can’t sleep, for crying out loud how did she ever stand Florida for 30 years?

The less Ma sleeps, the less work _I_ get done, which is bad because that is more time she spends trying to piss me off. I think it’s fair to say at this point, the more time I spend around my family — the more misserable they make me… Productivity isn’t even possible around them.

I wish I knew some thing about electrical wiring and manipulating A/C units the ‘hard’ way, maybe if I did, I could try to hot wire the bloody thing into running for her or fry myself in the process: which would solve the problem too LOL.

Oh what joy it would be… To actually be able to have a /productive/ day and get some sleep at night too, sheesh… I can’t remember the last time I could get a decent nights sleep, maybe the early 1990s or late 1980s? For some one born in ’88 that sucks lol.

*Sighs* with luck I can at least have time to deal with my mail tonight, it would be kind of nice if I could get some work done tonight, as opposed to having to go to work in the morning, be driven batty, and kept from doing any thing worth doing until after dark… As f’ing usual in this rats nest, I always got stiffed on time to do things but dragged into hop’n, skip’n, and jump’n about to do every thing else but what I’ve got to get done.

I need a freaking vacation

Whew it’s been a long day.

Been trying to get stuff done on the website in between instant messages, I really wish we could pick up the pass but we’re kinda split between three countries and our associated jobs.

Had to conduct a tryout in SWAT4 today, first time I’ve actually done it in SWAT4. Usually I only get to observe but not conduct, this time though it was a situation where I got asked to take care of business. Don’t get me wrong, I’ve done plenty of tryouts and been to a ton of them in both RvS and SWAT but it’s still a tryout.

I don’t really like conducting tryouts but I’ve done enough that I can get them running quickly and smoothly when not training others about the process. You’ve got to be able to judge the recruits performance, and I don’t really like to judge people. When it comes to doing tryouts, I am extremely strict, that is more or less how I was trained.

Some of my friends would say I’m just a right * proper bastard, suppose I am really lool. But when it comes to tryouts, even more so because I understand how important they are — and why we should be strict. I don’t have any problem with failing some one on their tryout, who said it was easy? But I’m also as fair as the Tryout SOPs allows me to be, things have to be done _correctly_ but honorably (y).

Although, to be perfectly honest I don’t think I’ve met any recruit that didn’t have it in them to pass a Troopers Tryout. If they didn’t, odds are they wouldn’t have been granted Recruit tags yet.

Heh, I remember my first clan back during my MechWarrior career. When I ended up with [SAS] down in Rvs, I was like “Huh? I’m getting trained and I’ve not been given a tryout yet?”. [SAS]‘s selection course I think is as close to the real thing in terms of being more like the military then the average group of gamers.

I’m really an easy going guy for the most part, but tryout conductor == iron fist-ed stickler for the tinest detail. When I conduct a tryout, you can generally be sure that who ever passes got a solid tryout or the ship went down trying!

The one thing I do like about conducting tryouts, is getting to debrief the recruit when they’ve passed. That’s the good part before the paper work and admin work pile up when they’ve passed haha.

1.5->1.5.1 update, dead flock’er

GRRRRRRRRRRRRRRRRRRRRRRR

PC-BSD update for 1.5->1.5.1 went smoothly if slowly but broke flock 🙁

Well, at lest they are starting to figure out you don’t have to nuke every installed port/pkg to do upgrades… They however still don’t seem to have fixed the flib’n syntax error in their sound detection systems XML file, which has been there since the new sound detection system hit.

Hmm, forced to get up early before work.

Interrupted while trying to get ‘work’ done before having to go to work

Shouted at it’s time to go once I finally get to sit down in peace >_>

What a way to start a work day, I love my family!!!

Playing with perl

Ok, so I got bored and wound up with a new toy 😛

Hmm, now to hunt down some snacks…


1: #!/usr/bin/perl
2:
3: use strict;
4: use warnings;
5:
6: use Getopt::Long;
7: use Image::Size;
8: use Pod::Usage;
9:
10: =pod
11: =head1 NAME
12:
13: image-size.pl
14:
15: =head1 SYNOPSIS
16:
17: image-size.pl [options] [file ...]
18:
19: Options:
20: -f, --ask-file include output from file(1)
21: -h, --help print usage help info
22: --man read manual page
23: -s, --silent ignore errors
24: -v, --verbose more verbose output
25: -d, --die blow up on first error
26:
27: =head1 DESCRIPTION
28:
29: A quick perl script to do what I've always wanted, tell me the height and width
30: of an image file. Without having to open a graphical program (X11) just for the
31: sake of finding out! File formats supported are based on the Image::Size module
32: which is required for this script to function.
33:
34: Special thanks to the creators of the llama book for mentioning perls
35: Image::Size module and thanks to the creators of that module!
36:
37: =head1 OPTIONS
38:
39: =over 8
40:
41: =item B<-f, --ask-file>
42:
43: Politely ask the systems file utility about the files format. This option
44: requires the file program installed and accessible through your environments
45: PATH.
46:
47: =item B<-h, --help>
48:
49: Print out a summery of command line options and exit.
50:
51: =item B<--man>
52:
53: Displays this manual page using the provided Plain Old Documentation.
54:
55: =item B<-s, --silent>
56:
57: Ignore failed files and continue, combine with -v or --verbose to include the
58: file name but still skip printing error messages.
59:
60: =item B<-v, --verbose>
61:
62: Print the file name along with it's width, height, and type (if known). Each
63: field is also separated by a new line and ordered in a more elaborate format.
64:
65: =item B<-d, --die>
66:
67: Default behavior for image-size.pl is to print a simple warning message if any
68: specified file can not be operated on.
69:
70: When the the -d or --die switches are given, the program will halt execution
71: with an appropriate exit status instead of continuing.
72:
73: This is useful for when you do not wish to continue after an error when
74: processing a list of files
75:
76: Refer to the perl documentation for details about how the exit status is
77: affected.
78:
79: =back
80:
81: =head1 EXIT STATUS
82:
83: The image-size.pl utility exits 0 on success or returns via perls die() if -d or
84: --die was passed on the command line.
85:
86: =head1 SEE ALSO
87:
88: L<perl(1)>, L<perldoc(1)>, L<file(1)>
89:
90: =head1 LICENSE
91:
92: Copyright (c) CLASS=integer>2008, TerryP <snip>
93:
94: Permission to use, copy, modify, and distribute this software for any purpose
95: with or without fee is hereby granted, provided that the above copyright notice
96: and this permission notice appear in all copies.
97:
98: THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
99: REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
100: FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
101: INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
102: OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
103: TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
104: THIS SOFTWARE.
105:
106: =cut
107:
108:
109: # message for pod2usage()
110: my $usage_msg = "$0 -- figure out the height and width of image filesn";
111:
112: # message to display on error getting the image size
113: my $warn_msg = "File does not exist or cannot be opened: ";
114:
115: my ($deadly, $help, $verbose, $man, $silent, $ask) = undef;
116:
117: {
118: Getopt::Long::Configure('bundling');
119: GetOptions(
120: 'f|ask-file' => $ask,
121: 'h|help|?' => $help,
122: 'man' => $man,
123: 's|silent' => $silent,
124: 'v|verbose' => $verbose,
125: 'd|die' => $deadly,
126: ) or $help++;
127:
128: pod2usage(-msg => $usage_msg, -output => *STDOUT,
129: -exitval => 1, -verbose => 0 ) if $help;
130: pod2usage(-verbose => 2, -exitval => 1) if $man;
131:
132: exit 1 unless @ARGV;
133:
134: # check if we are reading file names off stdin
135: if ($ARGV[0] eq '-') {
136: while (<>) {
137: chomp;
138: &print_size(imgsize($_), $_)
139: if -f $_ or $silent ? next : &handle_error and next;
140: }
141: } else {
142: foreach (@ARGV) {
143: &print_size(imgsize($_), $_)
144: if -f $_ or $silent ? next : warn $warn_msg."$_n" and next;
145: }
146: }
147: }
148:
149: sub print_size() {
150: my ($x, $y, $type, $file) = @_;
151:
152: $x = 'unkown' unless $x;
153: $y = 'unkown' unless $y;
154:
155: # keep it simple stupid
156: my $std_msg = "width-x: $xtheight-y: $ytfile type: $typen";
157:
158: # unless asked to shoot off your mouth
159: my $verb_msg = "file name: $filen" .
160: "width-x: $xnheight-y: $yn" .
161: "file type: $typenn";
162:
163: $verbose ? print $verb_msg : print $std_msg;
164:
165: print "running file(1) ...nn",`file $_`,"n" if $ask;
166: }
167:
168: sub handle_error() {
169: $deadly ? die $! : warn $warn_msg."$_n";
170: }
171:


I’ve almost finished Learning Perl with about 10 pages left, honestly it makes me itch to find a copy of the Alpaca book just to find out more lol.

It’s rare that I read about any given language beyond it’s documentation or tutorials but I’ve rather enjoyed this O’Riley, it’s understandable why the company has a good reputation (y). I even noticed a module in the appendix that might be handy for implementing a program I’ve always wanted but have never found one before.

Perl is a very fun language to put to work, I don’t think I’d want to do any thing lengthy in Perl (~1000s of lines) but for getting stuff done it’s quite handy. It also comes with a ****load of documentation hehe, not to mention I like the POD (Plain Old Documentation) style for doing things.