Wednesday, August 18, 2010
Command Line Screen Recording
Friday, June 18, 2010
AppleTV Harddrive Hack
Tuesday, April 20, 2010
Pushing View Controllers
PhotoListView *secondPage = [[PhotoListView alloc] initWithNibName:@"PhotoListView" bundle:[NSBundle mainBundle]];
[[self navigationController] pushViewController:secondPage animated:YES];
4) Done.
Getting back into Objective-C Programming
NSArray *pointsArray = [PolyShape pointsForPolygonInRect:rect numberOfSides:[polygon numberOfSides]];
//count the number of objects in the array and set a matching integer
int i;
i=[pointsArray count];
//setup our C array to match the number of objects in the pointsArray...
CGPoint thePointArray[i];
//for each object in the pointsArray, set a CGPoint value, add it to the C-Array (thePointArray) in it's matching index
for (id object in pointsArray) {
CGPoint thePoint = [object CGPointValue];
i--;
thePointArray[i] = CGPointMake(thePoint.x, thePoint.y);
}
Friday, January 15, 2010
Uninstall products from the command line
You'll need to find egrep for Windows. It's getting harder and harder to find.
Here's a script I made to uninstall a program called "Driver and Utility".
reg query
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
/s > "%TEMP%\reguninstall.txt"
TYPE "%TEMP%\reguninstall.txt" \\myk\netlogon\grep.exe -B 15 -E "Driver & Utility" \\myk\netlogon\grep.exe -o -E
"UninstallString.+" \\myk\netlogon\grep.exe -o -E "MsiExec.+" > "%temp%\uninstallcmd.txt"
FOR /F "tokens=1-10 delims={" %A IN ('TYPE "%temp%\uninstallcmd.txt"') DO
msiexec.exe /x {%B /qb
You'll have to excuse the line cropping. This script does 3 things.
#1, it pulls every program option from the registry and saves it in a file
#2, it then greps for the program name. This needs to be specific. Using grep we can ask it to pull lines previous to finding the query. We pull back 15 lines because it's a big key and we need to find the GUID
#3, we make a variable out of the GUID and execute the uninstall command.
The final uninstall command should look like this:
msiexec.exe /x {48435D4A-BDAF-4AC3-B172-B25F1AADE6C6} /qb
Voila.

