Saturday, December 12, 2009

How to remove ads from SBSettings

You have to install PHP and run this script
removeaps.php Select all

#!/usr/bin/php
<?
$filename = trim(shell_exec("find /Applications.* -type f -name SBSettings"));
$backup_filename = $filename.".bak";
$tmp_filename = $filename.".tmp";

while (file_exists($backup_filename)) {
$backup_filename .= ".bak";
}

if (!file_exists($filename)) {
die("Can't open: $filename\n");
}

copy($filename, $backup_filename);

echo "Patching file: $filename\n";
echo "Backup saved at: $backup_filename\n";

$fp = fopen($filename,"r");
$data = fread($fp, filesize($filename));
fclose($fp);

$data = str_replace('extra.thebigboss.org','extra.th4bigbo ss.org',$data);
$data = str_replace('mm.admob.com','mm.a4mob.com',$data);
$data = str_replace('r.admob.com','r.a4mob.com',$data);
$data = str_replace('ads.mobclix.com','ads.m4b4lix.com',$d ata);
$data = str_replace('a.qwapi.com','a.q4api.com',$data);
$data = str_replace('mydas.mobi','my4as.mobi',$data);

$fp = fopen($tmp_filename,"w");
fwrite($fp,$data);
fclose($fp);

shell_exec("ldid -s \"$tmp_filename\"");
shell_exec("mv \"$tmp_filename\" \"$filename\"");
shell_exec("chmod 4755 \"$filename\"");
echo "\nDone! :)\n";

?>


And you have to ldid -s /Applications/SBSettings.app/SBSettings

Wednesday, December 9, 2009

[How-to] dump yahoo weather city location codes for US

Here is the bash script to dump the location codes from weather.yahooapis.com

getcityloccode.sh Select all


#/bin/bash
for a in AL AK AZ AR CA CO CT DE DC FL GA HI ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA RI SC SD TN TX UT VT VA WA WV WI WY AS GU MP PR VI FM MH PW AA AE AP CZ PI TT CM ; do
countblank=0
for h in 0 1 2 3 4 5 6 7 8 9 ; do
for i in 0 1 2 3 4 5 6 7 8 9 ; do
for j in 0 1 2 3 4 5 6 7 8 9 ; do
for k in 0 1 2 3 4 5 6 7 8 9 ; do
locname=`curl -s -L "http://weather.yahooapis.com/forecastrss?p=US${a}${h}${i}${j}${k}&u=f" | grep "Yahoo! Weather for" | sed -e "s/\(^.*Yahoo! Weather for \)\(.*, ${a}\)\(.*\)/\2/"`
if [ "${locname}" != "" ] ; then
  echo US${a}${h}${i}${j}${k} $locname
  countblank=0
else
  countblank=$[$countblank+1]
  if [ $countblank -gt 5 ] ; then
    break 4
  fi
fi
done
done
done
done
done


and run it with
./getcityloccode.sh > cityloccodes.txt &

The results are

USAL0001 Abbeville, AL
USAL0002 Abernant, AL
USAL0003 Adamsville, AL
USAL0004 Addison, AL
USAL0005 Adger, AL
USAL0006 Akron, AL
USAL0007 Alabaster, AL
USAL0008 Alberta, AL
USAL0009 Albertville, AL
USAL0010 Alexander City, AL
...






Tuesday, December 8, 2009

Collection of 59 ebooks about Mac OSX

Collection of 59 ebooks about Mac OSX (1.35 GB)

List of these ebooks is below.
Addison Wesley – Cocoa Programming for Mac OS X 3rd Edition (2008).chm
Addison Wesley – Mac OS X Leopard Phrasebook (2007).chm
Addison Wesley – Step into Xcode Mac OS X Development (2006).pdf
Apress – Creating Mac Widgets with Dashcode.pdf
Apress – Foundations of Mac OS X Leopard Security (2008).pdf
Apress – Learn Objective-C on the Mac (2009).pdf
Apress – Mac for Linux Geeks (2008).pdf
Apress – Mac OS X Leopard, Beyond the Manual (2008).pdf
Dennis – The Independent Guide to the Mac 2nd edition (2009).pdf
Focal – Mac OS X for Photographers (2008).pdf
FriendsofED – Getting StartED with Mac OS X Leopard (2007).pdf
Macworld – Mac OS X Hints Leopard Edition (2008).pdf
MacWorld – Total Leopard, The Macworld OS X 10.5 Superguide (2008).pdf
Manning – Programming Mac OS X, A Guide For Unix Developers (2003).pdf
McGraw-Hill – How to Do Everything, Mac (2008).pdf
McGraw-Hill – Mac OS X Leopard QuickSteps (2008).pdf
New Riders – Mac OS X Leopard Killer Tips (2008).pdf
O’Reilly – Mac OS X Snow Leopard, The Missing Manual (2009).pdf
O’Reilly – Cocoa In A Nutshell (2003).pdf
O’Reilly – Essential Mac OS X Panther Server Administration (2005).chm
O’Reilly – Inside .Mac (2004).chm
O’Reilly – Mac OS X for UNIX Geeks (2003).pdf
O’Reilly – Mac OS X Hacks (2003).chm
O’Reilly – Mac OS X Leopard Pocket Guide (2007).chm
O’Reilly – Mac OS X Leopard, The Missing Manual (2007).chm
O’Reilly – Mac OS X Panther Hacks (2004).pdf
O’Reilly – Mac OS X Panther In A Nutshell 2nd Edition (2004).chm
O’Reilly – Mac OS X Snow Leopard Pocket Guide (2009).pdf
O’Reilly – Mac OS X Tiger for Unix Geeks (2005).chm
O’Reilly – Switching to the Mac, The Missing Manual Leopard Edition (2008).chm
Peachpit – Apple Training Series, Mac OS X Advanced System Administration v10.5 (2008).pdf
Peachpit – Apple Training Series, Mac OS X Deployment v10.5 (2008).pdf
Peachpit – Apple Training Series, Mac OS X Support Essentials 2nd Edition (2008).pdf
Peachpit – Mac OS X 10.5 Leopard, Peachpit Learning Series (2008).pdf
Peachpit – Mac OS X 10.5 Leopard, Visual QuickStart Guide (2008).pdf
Peachpit – Robin Williams Cool Mac Apps 2nd Edition (2005).chm
Peachpit – The Little Mac Book, Leopard Edition (2008).pdf
Premier – Mac OS X Power User’s Guide (2002).pdf
Que – Mac OS X Snow Leopard In Depth (2009).pdf
Que – Mac OS X Snow Leopard On Demand (2009).pdf
Que – Sleeping with the Enemy, Running Windows on a Mac (2006).chm
Que – Special Edition Using Mac OS X Leopard (2008).pdf
Sams – Mac OS X Tiger Unleashed (2005).chm
Sams – Teach Yourself Mac OS X Leopard All in One (2007).chm
Sams – Teach Yourself Mac OS X Tiger All in One (2005).chm
Sams – Xcode 3 Unleashed (2008).pdf
Sybex – Mac OS X Power Tools (2003).chm
Sybex – The Mac OS X Command Line, Unix Under the Hood (2005).pdf
Wiley – Cocoa Programming for Mac OS X For Dummies (2009).pdf
Wiley – MAC OS X Leopard Bible (2008).pdf
Wiley – Mac OS X Leopard, Just the Steps For Dummies (2007).pdf
Wiley – MAC OS X UNIX Toolbox (2009).pdf
Wiley – Mac OS X v 10.3 Panther, Top 100 Simplified Tips and Tricks (2004).chm
Wiley – MacBook Portable Genius (2009).pdf
Wiley – Macs All-in-One Desk Reference For Dummies (2008).pdf
Wiley – Macs For Dummies 8th Edition (2004).pdf
Wrox – Beginning Mac OS X Programming (2005).pdf
Wrox – Beginning Mac OS X Tiger Dashboard Widget Development (2006).pdf
Wrox – Beginning Xcode (2006).chm

Download
http://hotfile.com/dl/15057730/68b617b/Mac_OS_ebook_collection.part01.rar.html
http://hotfile.com/dl/15057787/1d29fcd/Mac_OS_ebook_collection.part02.rar.html
http://hotfile.com/dl/15057832/d83aca5/Mac_OS_ebook_collection.part03.rar.html
http://hotfile.com/dl/15057879/fc3b801/Mac_OS_ebook_collection.part04.rar.html
http://hotfile.com/dl/15057939/664a5b1/Mac_OS_ebook_collection.part05.rar.html
http://hotfile.com/dl/15057979/d7834d9/Mac_OS_ebook_collection.part06.rar.html
http://hotfile.com/dl/15058029/7f5a694/Mac_OS_ebook_collection.part07.rar.html
http://hotfile.com/dl/15058075/63a7a3d/Mac_OS_ebook_collection.part08.rar.html
http://hotfile.com/dl/15058126/66d2a22/Mac_OS_ebook_collection.part09.rar.html
http://hotfile.com/dl/15058183/595533c/Mac_OS_ebook_collection.part10.rar.html
http://hotfile.com/dl/15058415/fbdd174/Mac_OS_ebook_collection.part11.rar.html
http://hotfile.com/dl/15058478/a43d14e/Mac_OS_ebook_collection.part12.rar.html
http://hotfile.com/dl/15058539/195d3bb/Mac_OS_ebook_collection.part13.rar.html
http://hotfile.com/dl/15059551/1b71449/Mac_OS_ebook_collection.part14.rar.html

.
.
.

Monday, December 7, 2009

Remove print jobs in Mac OS X

Type this in Terminal to remove all print jobs

cancel -a -