The ADA (American Dental Association) + PopCap is giving away free copies of Plants vs Zombies for Halloween (2012). Check it out at Stop Zombie Mouth: http://www.stopzombiemouth.com/
Their promo is valid until Nov 11th, 2012.
The are advocating giving coupons for the game away instead of candy.
Introduction
Hi All,
You've found the blog of Leighly G Penrod (better known as Lee Penrod). Over the years I've helped thousands of people with technology questions. I started this blog to share some of the problems I've personally solved, and to act as a place to put bits of new articles before they are ready for release.
In the past I wrote serveral things published by Directron.com. I worked for them for several years including doing various bits of technical writing. Although I no longer work for them, I do still put up some content on my blog now and then.
If you are not familiar with my prior work, feel free to see these popular guides I have written-
| How to Install Front USB 3.0 Connections | |
How to Install Front USB (connecting front ports to the motherboard) | |
| Understanding System Memory and CPU speeds: A layman's guide to the Front Side Bus (FSB) | |
| |
Wednesday, October 31, 2012
Tuesday, October 30, 2012
A few quick links related to IP checking
Every now and then a Subnet calculator is handy, especially if you are managing IP Block lists. Here are a few useful links and projects I have found to be helpful.
1) PHP Subnet Calculator @ Sourceforge. A simple open source subnet calculator written in PHP. The author has a example site that is great if you need to do a simple calc from slash notation.
2) Lexdos. A simple site that shows an arbitrary IP address vs a Google Map.
3) Pear Package: Net_GeoIP. This handy little package will give you the ability to turn an IP address into a city / country / region and give you a rough guess on LAT/LONG. It does depend on a source data file put out by MaxMind but the basic version ( GeoCity Lite ) is free. The pear package + GeoCity Lite is enough to at least tell if an incoming request is from a different country -- potentially very useful for fraud detection.
1) PHP Subnet Calculator @ Sourceforge. A simple open source subnet calculator written in PHP. The author has a example site that is great if you need to do a simple calc from slash notation.
2) Lexdos. A simple site that shows an arbitrary IP address vs a Google Map.
3) Pear Package: Net_GeoIP. This handy little package will give you the ability to turn an IP address into a city / country / region and give you a rough guess on LAT/LONG. It does depend on a source data file put out by MaxMind but the basic version ( GeoCity Lite ) is free. The pear package + GeoCity Lite is enough to at least tell if an incoming request is from a different country -- potentially very useful for fraud detection.
Monday, October 22, 2012
Doing simple backup on Windows 7 and Server 2008
You know, sometimes bad things happen to your data. Although it is a best practice to regularly back up a file server or PC, I've always been a fan of point backups and other techniques that enable you to back up certain things on a repeated basis. I'm going to take a couple minutes to talk about two practices you should consider doing on your Server for any shared folder where one worker might destroy another's work either intentionally or unintentionally.
First of all -- Enable Shadow copies on your file server. Technet has a pretty simple article on this at:
http://technet.microsoft.com/en-us/library/cc771893.aspx
Shadow copy enables the "Restore Previous Version" feature you see commonly in Windows 7. The previous version feature basically reserves a small part of your drive to keep versions of your files as they change. It can't always save you but in the event of a failed backup or a minor problem like a long unchanged file that is suddenly gone, it can be the fastest method of restoring it.
Second, make and schedule point backups of critical files either with scripts or with a backup software. Windows backup isn't really good for this, it's good for a full backup but it has too many restrictions right now for this kind of issue such as the Windows Backup 4K bug that makes it difficult or impossible to use many types of external and internal drives for backup purposes (especially very large ones). You can and should use a dedicated non-advanced format drive like a WD Black 2TB or WD Black 1TB for a full backup on a scheduled basis however it shouldn't be your only backup for critical, often changed folders.
If you are not afraid of the commandline and task scheduler, my suggested method of backup would probably be to setup some simple batch scripts to do the task. There are a couple good free tools to make this happen. One good option is a simple install of 7-Zip.
7-Zip is a simple, yet powerful Compression / Decompression tool that runs on most operating systems. It is similar to WinRAR or WinZip but handles many formats and is free. When you install 7-Zip you will get a commandline version of the tool called 7z.exe (or 7za.exe ). It is commonly located in C:\Program Files (x86)\7-Zip after an install.
With the commandline version of the tool you can do virtually anything we can do with the file manager. Now there are several websites that talk about using 7-Zip on the commandline, but I'm going to share some specific examples.
Now to actually do these kinds of things on a scheduled basis you need to write a batch file, and it needs to drop a file with a unique file name. It also needs to delete the old files on a consistent basis so that you do not run out of space on the backup drive.
Steps to writing the batch file:
1) Get a date. Literally I mean set a date variable. I find this line to work well:
set _mydate=%date:~10,4%%date:~4,2%%date:~7,2%-%time::=-%
What this says is -- give me a variable I can use at the commandline with full date and time, in a format that won't break file naming. It will produce something like this:
20121022-16-00-00.33
in variable _mydate.
2) Put 7z / 7za somewhere useful. What you want is for typing 7z ( and hitting enter ) or 7za ( and hitting enter ) to run the program. You can do this either by editing your path to include the folder for 7-Zip (such as: C:\Program Files (x86)\7-Zip ) or by copying 7z.exe / 7za.exe to a folder that's already in the path such as C:\windows\system32
3) Pick what you want to backup, and get a place to back up to. Generally any drive or share is going to work if you have sufficient space. If you want to use a remote file share or something like a Seagate GoFlex Home Server ( NAS ) you'll want to add a map line to the batch file before your attempt to backup the files to ensure that the drive letter you are trying to hit actually exists.
4) Write the script.
Here's my example. Backing up All Excel and Word Files on a series of shared folders
5) Add cleanup. A few years ago a new command called forfiles was added to commandline that allows us to do that.
Lets assume we have a massive drive and the backup is fairly small. We can hold 1 year of backups on it.
We might have this command at the end of the backup batch file:
6) Save your batch file (usually done in notepad by saving as .bat ) and then go schedule it in task scheduler / scheduled tasks
Note:
If you are going to use a batch file to back up everything via scheduled tasks / task scheduler you are going to have to set it up so that the batch is ran with a user with a high enough privilege to work on the files and run everything even if you aren't there. In Task Scheduler this likely means you will probably need to set your security options to "Run whether user is logged in or not" and probably also "Run with highest privileges". [ Unless you make a specially crafted user for this task with just the right permissions for everything]. If you do not do this, then your backup will not run properly.
First of all -- Enable Shadow copies on your file server. Technet has a pretty simple article on this at:
http://technet.microsoft.com/en-us/library/cc771893.aspx
Shadow copy enables the "Restore Previous Version" feature you see commonly in Windows 7. The previous version feature basically reserves a small part of your drive to keep versions of your files as they change. It can't always save you but in the event of a failed backup or a minor problem like a long unchanged file that is suddenly gone, it can be the fastest method of restoring it.
Second, make and schedule point backups of critical files either with scripts or with a backup software. Windows backup isn't really good for this, it's good for a full backup but it has too many restrictions right now for this kind of issue such as the Windows Backup 4K bug that makes it difficult or impossible to use many types of external and internal drives for backup purposes (especially very large ones). You can and should use a dedicated non-advanced format drive like a WD Black 2TB or WD Black 1TB for a full backup on a scheduled basis however it shouldn't be your only backup for critical, often changed folders.
If you are not afraid of the commandline and task scheduler, my suggested method of backup would probably be to setup some simple batch scripts to do the task. There are a couple good free tools to make this happen. One good option is a simple install of 7-Zip.
7-Zip is a simple, yet powerful Compression / Decompression tool that runs on most operating systems. It is similar to WinRAR or WinZip but handles many formats and is free. When you install 7-Zip you will get a commandline version of the tool called 7z.exe (or 7za.exe ). It is commonly located in C:\Program Files (x86)\7-Zip after an install.
With the commandline version of the tool you can do virtually anything we can do with the file manager. Now there are several websites that talk about using 7-Zip on the commandline, but I'm going to share some specific examples.
Now to actually do these kinds of things on a scheduled basis you need to write a batch file, and it needs to drop a file with a unique file name. It also needs to delete the old files on a consistent basis so that you do not run out of space on the backup drive.
Steps to writing the batch file:
1) Get a date. Literally I mean set a date variable. I find this line to work well:
set _mydate=%date:~10,4%%date:~4,2%%date:~7,2%-%time::=-%
What this says is -- give me a variable I can use at the commandline with full date and time, in a format that won't break file naming. It will produce something like this:
20121022-16-00-00.33
in variable _mydate.
2) Put 7z / 7za somewhere useful. What you want is for typing 7z ( and hitting enter ) or 7za ( and hitting enter ) to run the program. You can do this either by editing your path to include the folder for 7-Zip (such as: C:\Program Files (x86)\7-Zip ) or by copying 7z.exe / 7za.exe to a folder that's already in the path such as C:\windows\system32
3) Pick what you want to backup, and get a place to back up to. Generally any drive or share is going to work if you have sufficient space. If you want to use a remote file share or something like a Seagate GoFlex Home Server ( NAS ) you'll want to add a map line to the batch file before your attempt to backup the files to ensure that the drive letter you are trying to hit actually exists.
4) Write the script.
Here's my example. Backing up All Excel and Word Files on a series of shared folders
set _mydate=%date:~10,4%%date:~4,2%%date:~7,2%-%time::=-%
7z a -tzip G:\backups\"docback-%_mydate%.zip "D:\fileshares\*.xls*" "D:\fileshares\*.doc*"This little script will give you a unique file named something like docback-20121022-16-00-00.33.zip in G:\backups\ that is a backup of all files in all folders below D:\fileshares\ that end in xls* or doc* ( i.e. it backs up both .doc and .docx ) Obviously you would need to change this to meet your needs.
5) Add cleanup. A few years ago a new command called forfiles was added to commandline that allows us to do that.
Lets assume we have a massive drive and the backup is fairly small. We can hold 1 year of backups on it.
We might have this command at the end of the backup batch file:
FORFILES /P G:\backups\ /M *.zip /d -365 /C "cmd /c del @FILE"This command will delete any files older than 365 days old.
6) Save your batch file (usually done in notepad by saving as .bat ) and then go schedule it in task scheduler / scheduled tasks
Note:
If you are going to use a batch file to back up everything via scheduled tasks / task scheduler you are going to have to set it up so that the batch is ran with a user with a high enough privilege to work on the files and run everything even if you aren't there. In Task Scheduler this likely means you will probably need to set your security options to "Run whether user is logged in or not" and probably also "Run with highest privileges". [ Unless you make a specially crafted user for this task with just the right permissions for everything]. If you do not do this, then your backup will not run properly.
Wednesday, June 20, 2012
New Article Out
Just a quick update-
I finished posting a new article over at Directron. The new article is basically a newer take on my old Front USB article -- this time over Front USB 3.0 connections. Check it out at:
http://www.directron.com/frontusb3guide.html
Feel free to leave comments here or on the Directron site.
I'm working on writing several new articles this summer.
I finished posting a new article over at Directron. The new article is basically a newer take on my old Front USB article -- this time over Front USB 3.0 connections. Check it out at:
http://www.directron.com/frontusb3guide.html
Feel free to leave comments here or on the Directron site.
I'm working on writing several new articles this summer.
Tuesday, October 11, 2011
Ram Disk that works under Windows 7 64bit ( x64 ) and RAGE
Recent events that have been going on in the tech world:
1) Ram prices have been very very low.
2) The game RAGE by ID achieved a lot of hatred in a short period of time due to launch bugs that largely stem from poor memory management (the lack of using resources it has available).
The main issue with RAGE that gets talked about is texture pop in. This happens because there is a lag between loading the texture, and you looking at it. Generally, well managed games are going to try to have as many textures that you might need soon in memory as possible. Rage just doesn't appear to do this effectively (at least as it was at launch), instead it will try and grab from disk and generally: Slower drive access = worse pop in. Some people with RAID 0 SSD setups had very little pop in.
Now, don't get me wrong - the problems with RAGE arn't just based on disk access. There are literally tons of fixes for it. If you are having problems, definitely the first place to look is the steam forum for the game, however there are a few other things worth noting.
First of all, one of the early things figured out was that rage doesn't have the cache path set or created. As I understand it, this cache location is used as additional texture space -- so the path containing the cache should be as fast as possible. For some talk about the specific way to set the cache try this blog entry:
http://blog.fiveinchfloppy.com/articles/reviewing-rage/
Now, from my perspective, the smart thing to do here is not put the cache on your main hard disk. The smart thing to do is to make a RAM drive / RAM disk for the cache. Creating a RAM disk in Windows Vista and Windows 7 has for many lead to a challenging or at least somewhat expensive proposition, however a while back I figured out a free way to do it.
The best tool that I have found to do this is IMdisk. Grab it here:
http://www.ltr-data.se/opencode.html/
IMdisk is a swiss army knife kind of app. It can mount disk images and as well as having the awesome feature of making a blank ram drive @ a drive letter of your choosing.
The trick most people miss with making it work under Win 7 x64 is the step of running cmd as administrator and running the following commands:
sc config imdisk start= auto
net start imdisk
Installing IMdisk, and running those command line commands will activate IMdisk so that you can create a RAM disk from both control panel and from their command line version of the program.
Basically, once you have the ram drive, you can write a script to create the ram disk that you can either have auto start when you boot the machine, or can run manually before opening RAGE. (of course you could do it by hand w/ the control panel app but that's a bit annoying).
Hopefully the above is enough to help you put 2 and 2 together. If you have a lot of ram in your machine ( 12 GB or more) you could also make a more complex RAM drive setup to help things out.
It would go something like this:
1) Taskkill steam.
2) Create big ram drive. Format it NTFS
3) Copy all or part of rage to the ram drive.
4) Copy whatever you copied to the ram drive to a backup location somewhere on your hard drive (in case the PC gets shut off mid game).
5) Make a junction between the folder point you copied and the place you copied it to on the ram drive. (If done properly, going to it will go to the ram drive instead.
6) Start Steam.
After the script runs, steam will see no issues if this was done properly. Junction transparently handles the change in location of the files. The down side to this is that if Steam did an update to RAGE before you go t play it then the changes would be written to the ram drive (potentially) instead of to the hard disk. A way to avoid this is to make a shut down script for the machine, or a script to run after closing the game that would undo the ram drive process
(taskkill steam, remove juction using rmdir, copy ram drive contents back to origional location it's expected to be in, start steam, add a command to remove the ram disk if you want to free back up the ram.)
For some information on how to create a junction see:
http://technet.microsoft.com/en-us/library/cc753194(WS.10).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365006(v=vs.85).aspx
To remove the junction, use rmdir, don't use del, it could kill the files at the other end of the junction.
I hope that this has been helpful to improve your RAGE experiance. This trick is also useful for all kinds of other games, as forcing major textures or other files into ram can dramatically reduce load times. If I have time I will try and make a more detailed guide at a later date.
Don't have enough ram to try and fancy version of this approach? Consider upgrading your RAM with parts from Directron.com.
1) Ram prices have been very very low.
2) The game RAGE by ID achieved a lot of hatred in a short period of time due to launch bugs that largely stem from poor memory management (the lack of using resources it has available).
The main issue with RAGE that gets talked about is texture pop in. This happens because there is a lag between loading the texture, and you looking at it. Generally, well managed games are going to try to have as many textures that you might need soon in memory as possible. Rage just doesn't appear to do this effectively (at least as it was at launch), instead it will try and grab from disk and generally: Slower drive access = worse pop in. Some people with RAID 0 SSD setups had very little pop in.
Now, don't get me wrong - the problems with RAGE arn't just based on disk access. There are literally tons of fixes for it. If you are having problems, definitely the first place to look is the steam forum for the game, however there are a few other things worth noting.
First of all, one of the early things figured out was that rage doesn't have the cache path set or created. As I understand it, this cache location is used as additional texture space -- so the path containing the cache should be as fast as possible. For some talk about the specific way to set the cache try this blog entry:
http://blog.fiveinchfloppy.com/articles/reviewing-rage/
Now, from my perspective, the smart thing to do here is not put the cache on your main hard disk. The smart thing to do is to make a RAM drive / RAM disk for the cache. Creating a RAM disk in Windows Vista and Windows 7 has for many lead to a challenging or at least somewhat expensive proposition, however a while back I figured out a free way to do it.
The best tool that I have found to do this is IMdisk. Grab it here:
http://www.ltr-data.se/opencode.html/
IMdisk is a swiss army knife kind of app. It can mount disk images and as well as having the awesome feature of making a blank ram drive @ a drive letter of your choosing.
The trick most people miss with making it work under Win 7 x64 is the step of running cmd as administrator and running the following commands:
sc config imdisk start= auto
net start imdisk
Installing IMdisk, and running those command line commands will activate IMdisk so that you can create a RAM disk from both control panel and from their command line version of the program.
Basically, once you have the ram drive, you can write a script to create the ram disk that you can either have auto start when you boot the machine, or can run manually before opening RAGE. (of course you could do it by hand w/ the control panel app but that's a bit annoying).
Hopefully the above is enough to help you put 2 and 2 together. If you have a lot of ram in your machine ( 12 GB or more) you could also make a more complex RAM drive setup to help things out.
It would go something like this:
1) Taskkill steam.
2) Create big ram drive. Format it NTFS
3) Copy all or part of rage to the ram drive.
4) Copy whatever you copied to the ram drive to a backup location somewhere on your hard drive (in case the PC gets shut off mid game).
5) Make a junction between the folder point you copied and the place you copied it to on the ram drive. (If done properly, going to it will go to the ram drive instead.
6) Start Steam.
After the script runs, steam will see no issues if this was done properly. Junction transparently handles the change in location of the files. The down side to this is that if Steam did an update to RAGE before you go t play it then the changes would be written to the ram drive (potentially) instead of to the hard disk. A way to avoid this is to make a shut down script for the machine, or a script to run after closing the game that would undo the ram drive process
(taskkill steam, remove juction using rmdir, copy ram drive contents back to origional location it's expected to be in, start steam, add a command to remove the ram disk if you want to free back up the ram.)
For some information on how to create a junction see:
http://technet.microsoft.com/en-us/library/cc753194(WS.10).aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365006(v=vs.85).aspx
To remove the junction, use rmdir, don't use del, it could kill the files at the other end of the junction.
I hope that this has been helpful to improve your RAGE experiance. This trick is also useful for all kinds of other games, as forcing major textures or other files into ram can dramatically reduce load times. If I have time I will try and make a more detailed guide at a later date.
Don't have enough ram to try and fancy version of this approach? Consider upgrading your RAM with parts from Directron.com.
Tuesday, June 29, 2010
Saturday, June 26, 2010
Weird USB Devices
You know, at Directron I see my share of strange devices from time to time. Some are good, some bad, and some in between. We can't carry everything. If you are looking for something truely odd / unique try out Brando. They have the truely odd / strange stuff like a USB Cigarette Lighter, Vibrating Hamburgers or USB Heated Kneepads.
OK, I realize some people could use that last one ;)
OK, I realize some people could use that last one ;)
Subscribe to:
Posts (Atom)
