Batch rename files in Windows from Command Line

1 Comment

This is an easy way to add a prefix to any set of files in a Windows folder, from a command prompt type this

for %a in (*.*) do ren "%a" "prefix - %a"

 

Tried in Windows 10. Thanks to ofer.sheffer in this Stackoverflow post where there is also an example on how to do this in PowerShell.

Resize and Convert EPS to PNG, GIF, JPG

No Comments

This is a great free alternative to Photoshop or other imaging software if you just want to do some simple resizing of photos, logos etc.  I usually get a hires image, e.g. EPS format (Encapsulated Postscript) and need to resize it and save it as a PNG or JPEG for a web site. If you are using Windows I recommend using IrfanView.

1. Download and install IrfanView

2. Download and install the IrfanView plug-in pack (for Save as PGNG/JPG/GIF support and other stuff too)

3. Download and install Ghostscript (for EPS support)

Current versions of Irfan View and plugins are 4.33, Ghostscript is 9.05. All 32-bit Windows.

Compare and Merge Text Files

No Comments

This is more a less a note to myself to remember what the text file comparison tool that I use from time to time is called: WinMerge!

It’s a nice Open Source Windows application where you can easily compare two or more text files to each other and make changes or copy from one file to the other while comparing. For example great when comparing to versions of a php file etc.

Brilliant and Exciting Electric Car Project

No Comments

A few months ago I saw a video about Shai Agassi’s new electric car project – Better Place – and I still think it’s a very exciting and brilliant concept.
Our neighbor Denmark have already signed up for this and I hope it will also come to Sweden – and the world! – eventually.
I can’t wait to drive a zero emission vehicle!

The project/company started late 2007. I don’t know why have not heard about it earlier, to many of you this is probably old news.
If you haven’t already heard about it you can read more in this Wired Magazine article or visit Better Place’s homepage.
Shai Agassi is a former SAP top executive.

What I love about this project:

– New and easy cost model based on the model for cell phone subscriptions: Free or very low cost car, pay per mile. And get this: the mileage cost will be considerably lower than for the car you are driving today. I think this is key – there is no monetary penalty for consumers to go green, only advantages.

– Open standard – Existing battery manufacturers will be making the batteries. Existing car manufacturers will be making the cars. This means no strange new models to get used to. Nissan/Renault already have cars ready for production.

Only non-carbon, renewable energy sources will be used (solar, wind, water etc)

– The grid thought. With all the batteries in cars and Battery Exchange stations there will be a huge distributed energy system that can be used to fill up when energy is cheap during night time (ie. not in high demand) and redistribute it during daytime.
Eg. your car’s battery is fully loaded during night but your on-board system knows you will actually only be needing about 50% battery capacity so during the day when your car is parked and plugged in the other 50% of your energy can be redistributed to other cars or sold on the market.

– The grand scale and time frame. The ambition is to do this for the world. Already signed up: Israel, Denmark, Australia, California, Hawaii and Canada.
And this is happening now! Quote from Wired Magazine: “Better Place expects to have close to 100,000 vehicles by the end of 2011”

I also love this quote from the 4-minute intro video on Better Place’s web site: “Hi, I’m Shai Agassi and I’m the end of oil”

The biggest weak point as I see it is the cost for building the infrastructure.
But for recharging stations I’m sure the existing power grid will be used and for Battery Exchange stations I’m sure there will be an incentive for existing filling stations to come on board. After all, the countries that have signed up for the project have agreed to tax cuts for electric cars and tax raises for traditional cars, this in combination with the new pay model (free or very cheap car and low mileage cost) should be able to quickly move a lot of people to electric.


I’m keeping my fingers crossed that this project will actually work, it would have great impact on our co2 emissions!

Side note:
I can’t help but thinking maybe there is another motive behind this project too. When I read that Israel is the first country that signed up to do this I can’t help but thinking that there could be another great motive for them apart from the environmental: If this project succeeds and break most of the world’s oil dependence, as a side effect Israels enemies funding (which of course comes from oil) will also be cut off.
If my conspiracy theory has any truth to it I think this is a very smart move by Israel. And I say this without taking sides in the mid east debate/conflict, I think the sad situation there is far too complex for me to fully comprehend.

Vista and World Community Grid

3 Comments

I haven’t been able to get the World Community Grid (WCG) client (United Devices UD.EXE) to run well on my Vista machine. It has been running for awhile then giving me messages like “Unable to process Task data. Backing-off.”

I have Googled but not found a solution. Then today I went directly to the World Community Grid forum, it seems the forum is not indexed by Google for some strange reason.
Anyway I after reading the forum it seems to be a security issue when running on Vista.

Two solutions that seem to be working well:

1) Change security settings for C:\Program Files\World Community Grid (or wherever you installed) so that the group USERS have Full Control.

2) This I have not tried myself but is confirmed by many forum postings: Try to install outside C:\Program Files, e.g. C:\WCG, or even on a different partition than your
system, i.e. not on C:

I also tried running the WCG client (UD.EXE) using the Run as administrator option in Vista (right click the program icon and select Run as administrator). It seems to be working even if I for some reason at first got the logon screen in WCG client. This will not work if you have WCG run at startup.

You would think this problem/solution is something that should be
1) Hilited on the WCG homepage (at least the download section)
2) Fixed in the client or install program

By the way – If you’re not already running WCG, why not start today. Let your computer help solve world problems while you don’t use it yourself, e.g. when you’re on your coffee break.
I recieved this email the other day, this is truly great stuff!

World Community Grid is pleased to announce that the Help Defeat Cancer (HDC) project is finished. The last work units have been sent out and when the final results are returned, the project will come to an end. This project, which launched on July 20, 2006, will have run for just over 9 months by the time the last results are returned. During this time 88,000 members will have donated 2,900 years of computer time on 138,000 different computers. This is a significant contribution to cancer research.

Loan a stranger your hard earned money without interest or payback guarantee (no kidding!)

No Comments

This is great – keep reading!

As you may or may not know Muhammad Yunus and his Grameen Bank was awarded the 2006 Nobel Peace Prize for their efforts with micro credits (or microloans or microfinance) in Bangladesh.

Now you too can support a small business in the developing world! Just go to www.kiva.org and select a business you would like to support.

You will be paid no interest and there is no guarantee that you will ever get your money back, even though chances are high:

So far, Kiva has experienced a 100% repayment rate on all businesses with completed loan terms.

Prior to Kiva, our Field Partners have historically experienced a >96% repayment rate with the poor they serve.

In the past 30 years, over 100 million of the world’s poor have received a micro-loan and demonstrated a >95% repayment rate.

You can lend from USD 25 (with credit card or bank transfer through PayPal) and up and you will recieve status reports on how your investment is going.

I loaned $25 to Sophia Nasoro from Tanzania who wants to borrow a total of $1000 to grow her catering business.

So what are you waiting for? Go ahead and loan some money today!