Categories

Our Sponsors

DOS commands / Batch file scripting

I hate to admit on a Unix admin type Blog that I have been recently forced to work in the Windows OS world.

Thankfully I have been able to place Cygwin on most of the systems that I support.

I have, however, needed to be able to create a few batch files that would run on a scheduled basis for various things and had to learn the tricks of the trade for working in the DOS command prompt.

Personal Cheat Sheet.

: — (followed by a space), alternative for “rem”, starts a comment
^ — line continuation… like a backslash (\) at the end of the line in unix
& — command separator (cmd1& cmd2& cmd3), like “;” in unix
&& — only execute the next statement if the last one succeeded, like unix/perl
|| — only execute the next statement if the last one failed, like unix/perl

  • Passing in command line variables/parameters

Batch files can only handle parameters %0 to %9, ie cmd.bat Foo Bar where in the cmd.bat Foo=%1 and Bar = %2

  • For Loops
  • FOR %A IN (list) DO command [ parameters ]

I did find this web site has tons of useful information on windows scripts.
The menu at the left will expand to show more info on each topic.

Finding system uptime
* net statistics server

Listing all of your systems drivers
* DRIVERQUERY /V /FO CSV > %ComputerName%.csv
  • Share/Bookmark

Cheap Ipad Cases

I found that the Netbook cases for the 10 inch screens is perfect for your Ipad.  Why go to the Apple store and fork over $40 for a Neoprene case, when you can find them for $10 or less for Netbooks.

Here is an example that is only $5.99

  • Share/Bookmark

No Wonder Americans are Fat

I have noticed over the last couple of months, mostly because it’s now summer and people are wear less clothing, that America is Fat and I can see why.

For starters most of America doesn’t really work hard any longer at their daily jobs.  A long time ago and in many parts of the world there is a lot of manual labor involved and thus a lot of muscles get worked every hour of every working day.  In America most stuff is automated and we don’t manufacture as much as we once did.  What I find interesting is that this has made many Americans lazy.  Think of this list of actions I have seen that shows how lazy we have become.

  1. Circling a parking lot for 10 minutes looking for a space 50 feet closer to the door.
  2. Taking the elevator in the gym to get to the stair master on the 2nd floor.
  3. Pushing the handicap door opening button for every door that has one.
  4. Driving you car to anywhere that is less than 4 city blocks.
  5. Super-sizing every meal.
  6. Oversizing every meal portion.
  7. Complaining that you can’t workout or do any physical activity because some part of your body “hurts”.
  8. Having unhealthy snacks at your desk, or couch.
  9. Spending countless hours watching TV.
  10. Just simply doing nothing about it.

Not that I have a beef against people that are overweight.  I know there are those that have a “condition” or that have been fat their whole lives.  I am just upset about the people that get large and just don’t seem to care about it, and in fact complain about how they look, but yet do nothing about it.  Some try some new fad type diet but those just don’t work in the long run.  Ok, oh smart and skinny one, how does someone become unlazy and loose weight.  I say it’s a simple weight loss program I call ELMM, “Eat Less Move More”.   With some slow changes to your live you can still do a lot of the same things you once did, but you will become healthier.  It doesn’t take pounds off in a few weeks, but it does make you healthier in the long run.  Cool another list.

  1. It’s been said before, but park father away to everything.  You car will be happier and maintain a dent free exterior much longer.  The extra short walk will do you good.  I’m not saying park in the north 40 and hike in, just pick a spot a couple over from the last car  in a row.
  2. If you are only going 1 floor up or down find and take the stairs if you can find them.
  3. Open the doors yourself.  In fact try not to utilize the automated anything in your life.  Yes those moving walks are faster, so walk on it, don’t just ride it.
  4. Take the time to walk more.  Americans seem like they are in such a hurry to do everything and in the end the rush was so they can sit on their butts for 4 to 5 hours a night.  What’s the rush?  Get a TIVO and watch that junk later.  If the location you are going can be walked in 5 to 10 minutes, do your life a favor and walk.   It may seem painful at first and slow, but after a few times you get used to it.  Save the driving for far away places, bad weather, or if you have to haul something.
  5. With meals I found your need to try smaller portions.  Just get a medium size coke and fries next time and maybe everytime.  It about habits. If you always get a large size then that is what you are used to, if you get a small every time then that will be the new you.  It will not be all that easy the 1st few times, but stick with it.
  6. Here is a hard one for most people.  You eat these huge portions of food and have stretched out your stomaches to make it fit.  Your body only really needs a portion that is about the size of your hands, maybe even a touch smaller.  Yes, you will feel like you are staving the first few times you make this change.  But over time that is what your body will become used to.  Eat smaller portions on a regular schedule.  Don’t wait until you are hungry to eat.  Eat breakfast at 8 everyday, then lunch at 11:30, and light fruit snack at 3 and dinner at 6.
  7. The complaining about some body part that hurts is a funny one.  I can’t walk or take the stairs because it hurts my knees.  No You Are Fat and that is why your knees hurt.  Any muscle that it un-exercised will hurt when used.  Once you make it a habit to start to use those muscle they will get used to moving again. Of course don’t over do it and injure yourself, start slowly and build habits.  I bet the first flight of stairs will seem like Mount Everest, but after a month of doing them you may forget how you used to get to your office.
  8. If you can’t help yourself in eating junk food, don’t have any lying around.  Yes you might get hungry, so leave some change at your desk, at least this will make you walk to the vending machine and will make you think about what you are getting.  You can also have some healthier snack around too.
  9. We all like to watch TV.  Try and multi-task while you watch your favorite shows.  Do some ironing, at least you should be stand throughout the show.  Watch your shows sitting on an exercise ball, or riding on a stationary bike.  You might find it interesting that you can just stand there and watch a show for 20 minutes and you can just forget that you are standing.
  10. Remember it’s all about habits of eating less and moving more.  Change your habits and you can change your life.
  • Share/Bookmark

Skinny Dipping

An elderly man in Florida had owned a large farm for several years.
He had a large pond in the back.

It was properly shaped for swimming, so he fixed it up nice with picnic tables, horseshoe courts, and some orange, and lime trees.

One evening the old farmer decided to go down to the pond, as he hadn’t been there for a while, and look it over.

He grabbed a five-gallon bucket to bring back some fruit. As he neared the pond, he heard voices shouting and laughing with glee.

As he came closer, he saw it was a bunch of young women skinny-dipping in his pond.

He made the women aware of his presence and they all went to the deep end.

One of the women shouted to him, ‘we’re not coming out until you leave!’

The old man frowned, ‘I didn’t come down here to watch you ladies swim naked or make you get out of the pond naked..’

Holding the bucket up he said, ‘I’m here to feed the alligator.’

Some old men can still think fast.

  • Share/Bookmark

Marking Songs for Removal from Ipad

I broke down and got myself an Apple IPad.  So far it’s a pretty fun little device.  I won’t say that it totally removes the need for a full desktop, but it does do quite a bit.

I am a little upset that there isn’t a TAB or arrow keys on the virtual keyboard.  It’s a bit of a pain for someone with fat fingers to move around in a block of text when you are editing something.  The finger focus that pops up when you hold your finger on a text screen for a while can do the job, it takes me away from the keyboard and the flow I was on to make the change.

The gist of this article is that I wanted a way to move music from Itunes to the new IPad.  I had a preexisting library of about 10,000 tunes already so organizing the songs has been a bit of a chore.
I did find a trick to be able to mark the songs that I do not want on my IPad.  I’m sure this trick would work for Ipods and Iphones as well.  I set the transfer in Itunes to only put checked songs on my IPad.  On the Ipad I created a new playlist called “Uncheck”.   When I sync back up to Itunes I go and uncheck all but one song in the “Uncheck” playlist.  Bang they are all removed from the Ipad.  You need to leave at least one song in the “Uncheck” playlist or it will not show up on the Ipad after you finish syncing and you would have to create a new playlist on the Ipad and you will end up with duplicates in ITunes.

This is a great way to add whole albums and such to the Ipad.  It is a helpful tool in removing any duplicates that you may have, or just songs you don’t want to hear, but don’t want to delete from your library.

  • Share/Bookmark

Germany finally Conquers Europe

I took a few articles, some monetary policy information (STRATFOR) and recent news about Europe and the Euro and have come to the conclusion that Germany has won.  The euro is essentially gutting the European economic base because Greece, Portugal, Spain and Italy (in that order),  each have done such a poor job of keeping their budgets under control and now they are flirting with debt defaults.  All have grown fat and lazy off the cheap credit the euro brought them.  Germany is a rich, technocratic, capital-intensive economy with strong credit markets and efficient workers.  It is difficult for the poor, agrarian/manufacturing economies that have high labor costs and that are living off of the difference between the credit they received due to the euro and the credit they qualified for on their own merits.  Slowly Germany is achieving by stealth what it failed to achieve in the past thousand years of intra-European struggles.  In essence, European states are borrowing money (mostly from Germany) in order to purchase imported goods (mostly from Germany) because their own workers cannot compete on price (mostly because of Germany). In essence Germany is taking over control of all of Europe through monetary policy, they will want the Euro to survive as the Euro acts as a  control mechanism for Germany against other countries, and the other countries would never want to leave on their own as they would be bankrupt and excluded from the Euro benefits.

Germany wins control of all European States by acting as the anchor to their monetary system.

Hail!,  I mean way to go Germany..

  • Share/Bookmark

Setting up xbmc on Acer Aspire 1600

My journey on setting up a Media Center PC on a Acer Aspire 1600.

Tigerdirect had a great sale on the units so I purchased one and a Gyrus Universal Media Center Remote.

From some message boards I read up on I also purchased the extra 1GB of ram for the Acer, so that 1080p video would be possible.  Although, I just found out that my TV is 720p/1080i which isn’t 1080p.  Oh, well the system should work just that much better.

I decided to just setup the Acer as is, with all of its standard components before I start adding on things.

My planned addons are:

  1. The Gyrus remote
  2. Wireless keyboard and mouse.
  3. Wireless USB dongle (If this thing doesn’t have wireless internal.
  4. The extra GB of RAM.

My software plans for now are

  1. I-Tunes
  2. XBMC for windows.  ( I know I probably could just install Ubuntu or boot from a USB drive, but all of the other systems in the house are PC, so I will stick with it for now)

First impressions.  Well, it didn’t come with a manual.  WTF! I guess I have to go find one.
I found the manuals online at Acer’s Web site.

I found a nice video on how to open the Acer Aspire on Youtube to add the memory.  Adding the memory was a bit tight.  I found that you need to shove the memory in at an angle then push down and snap into place.

The mouse and keyboard look cute, like small size Mac style and all white.  Good think I have an extra wireless unit available.  When I had the unit open I did see that there was not a wireless card installed.  I’ll have to go with the USB dongle for now.  I do plan on an upgrade for the house to Wireless N and I might just get a new internal card at that time.

  • Share/Bookmark

Use these Euphemisms

Try making a complete sentence out this these new found Euphemisms

Savoring the Technicolor Bishop

Slamming the Brass Wookie

Tainting the Yogurt

Here are some examples:

The film shocked audiences nationwide with its frank depiction of two men slamming the brass wookie.
Then, I had to sit next to some crazy guy on the bus who was apparently tainting the yogurt.

Have Fun.

  • Share/Bookmark

My now rare cars

I am not a huge car buff, but I have found out this week that both of my cars are now considered rare.

user27549_pic733_1260855337First my daily driver is a Dodge Caliber SRT4.  From a registry created on one of the SRT4 forums they have 206 VIN numbers from the 482 produced, so almost half of the cars are registered.  I did a little math and it appears that roughly 8-10% of the cars registered are Sunburst Orange, so will assume on the high side of 10%.  That would make my Caliber SRT4 1 of 48.

  • 2008 production:  482
  • 2009 production:  222
  • Total production:  704

2008 Dodge ViperI have the production numbers for the 2008 Dodge Viper listed below, so according to the chart my car is 1 of 65, but the list here doesn’t show which cars have stripes, so I would guess the Viper is about 1 of 48 as well.

I guess it’s pretty cool if I can keep both of them in great shape for about 20 years.  It will totally suck to try and sell one off in a couple of years as most people won’t want some sort of rare car that parts may be hard to find.   I guess I need to treat them with care and keep them looking good as long as I can.

HERE’s to having 2 cars that are 1 out of 48 in the World.

2008-Production-Nos

  • Share/Bookmark

Another new Invention Idea

Ok, so the problem with some of the electric cars is that there isn’t a great way to keep them charged other than plugging them in to an outlet.

  • There are solar cells, but they don’t generate enough energy quickly enough.
  • Most electric cars have regenerative braking, but that doesn’t return a lot of power.
  • I’m sure there is some energy returned when the car is coasting or rolling downhill, but again you had to use more energy to get up the hill or up to speed.

Well, here is my idea.  It stemmed from the thought that electric cars are too quite.  Why not have a pipe that runs under the car where the old exhaust ran and have it intake air on the front and then make a sound out of the back or sides like a trumpet or other horned instrument.   The faster you go the louder and more noise it makes.  I wasn’t thinking Harley type loud, but just enough to where you could here the car coming and give it an old time low motor-ish rumble.

But wait there’s more.  Why just have the tube produce a sound? It seems that it should be possible to place turbines inside the tube or tubes that could use the wind force to spin and create electricity.  I at first thought that you would have a small opening on the front that channels the air flow into chambers for maximum pressure at lower speeds (say 30MPH might be the optimum speed).  Inside the chamber would be many little fans that catch the wind and spin,  I envisioned the fans that run on computer CPU’s.  Having a few tubes running under the car catching the directional airflow that is there anyway and spinning many little rotors would seem like it could make a lot of extra power.  I guess you would have to account for the added weight of the tubes on the car, and the tubes may add to the drag, although the air does pass through the tube and is under the car catching air that was already broken by the front of the car.  I liked the tube idea in that typical windmills try to catch air from many directions, with the car it can really only be going in one direction so the air is always coming from the front.

Then I got to thinking if an array of small fans was the right way to go, or if there would be more power generated by a turbine setup.  Instead of 20 or more little fans in the tube, why not one turbine like in a jet that would be larger, yet spin faster with the available wind force.  I had pictured like a tube from the front and a larger part in the tube sort of like the mufflers of today.  Inside the muffler would be a turbine catching the forced directional air from the cars movement and creating power to return to the batteries.

So I did a little Google searching and did not find anything under “Tube Wind Turbine Generators”.  I attribute this to the fact that it’s hard to force air down a tube.  But in a car that is moving in a linear direction it isn’t.  I did find some formulas on calculating the power you would get, but it’s based on Windmill type generators.   It was interesting to read that a setup with the fan blades falls into the formulas given, and that a single fan would only be able to gather about 30-40% of the available force of the wind, which makes sense.  So in the case of the array of fans it is possible to almost achieve near 100% efficiency as you would have a multitude of fans pulling the energy out of the force.  Say if inside the tube you had 20 fans.  The first fan takes 20% of the force and converts it to energy, then the next takes 20% of what is left and so on.  In my theory, if you want to call it that, at 30 MPH all fans would be spinning, at 20 MPH maybe only the 1st 15 fans have enough force to spin and the last 5 don’t have enough wind to spin.  Of note though at 40MPH there might not be as much gain as the fans would all be spinning and at some maximum revolutions and thus not generating any more energy than at a lower speed.

Then I think about something like a jet turbine that would spin faster.

Then I have the thought that current wind turbines are attached to a generator.  The small fan idea works in that each small fan could have a small generator and have wires feed out of the tube.  A jet turbine type fan would need to be attached to a generator too.  And as I think about it the jet turbine would not use up as much air as the array of fans would, although you could put 2 or 3 turbines in the tube to gather the passing air.

That is it in a nut shell.  It totally seems plausible to be able to have inlets on the front of an electric car that force air into a tube that later passes the air over either fan blades or though a jet turbine of sorts that would be able to generate electricity for the car while it was moving.  The trick is how much energy could the tube create, how much weight does it add, how much drag does it create, and how do you keep the insides of the tube from gathering junk from the road?

  • Share/Bookmark
Get Adobe Flash playerPlugin by wpburn.com wordpress themes