Hosting providers Odyssey….

digitalocean
digital ocean

Been there done that. After using 10 different hosting provider over the past 10 years now. I decided to do a step forward to a more flexible and up-gradable solution. I search for a cloud based hosting provider. For windows solutions the licencing was going to rise the cost anyway, so i decided to go unix all the way. Google’s Adsense cached my recent search and I accidentally stumbled upon Digital Ocean.

I managed to deploy an cloud server in less than 1 minute with a dedicated IP and root SSH access. And for the cost of just 5 buck / month. Crazy prize for the SSD performance servers. The good thing about this, is the speed, you can use swap files to enlarge the RAM of your server, and still have a good performance. I found some performances test here. Digital Ocean also has a good support library.

Because the pricing structure Digital Ocean is offering, and if they do not oversell their server, I think they are here to stay. This blog is also hosted there.

This computer is not running genuine windows 0x8004fe21

windows activation

This solution is the only one worked for me… restoring windows to an earlier point did not work for me. So try the following

1) Click Start button.
2) Type: CMD.exe into the ‘Search programs and files’ field
3) Right-Click on CMD.exe and select Run as Administrator
4) Type: net stop sppsvc (It may ask you if you are sure, select yes)
Note: the Software Protection service may not be running, this is ok.
5) Type: cd %windir%\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform
6) Type: rename tokens.dat tokens.bar
7) Type: cd %windir%\system32
8) Type: net start sppsvc
9) Type: slui.exe
10) After a couple of seconds Windows Activation dialog will appear. You may be asked to re-activate and/or re-enter your product key or Activation may occur automatically.

Chome / Shockwave Flash Crashing

Last 2 months a had an constant issue where Sockwave flash kept crashing after a while. I had to restart chrome to make browser responsive. This is the easiest solution I found to resolve this.

Open Chrome
Copy-Paste this text on Address bar chrome://plugins/
Or go to Options->Under the Hood -> Content Settings -> Disable individual plug-ins… (Click)

Now Locate Flash on this List. If you see Flash (2 files) this is good.

On the right you will see a details button, Expand.

And disable the Flash version with Location
“C:\Windows\SysWOW64\Macromed\Flash\NPSWF32.dll”

Dead Center DIV

body {
margin: 0px
}

#horizon {
color: white;
background-color: #0ff;
text-align: center;
position: absolute;
top: 50%;
left: 0px;
width: 100%;
height: 1px;
overflow: visible;
visibility: visible;
display: block
}

#content {
position: absolute;
left: 50%;
width: 250px; /* Overall width of div */
height: 70px; /* Overall height of div */
top: -35px; /* half of the overall height */
margin-left: -125px; /* half of the overall width */
visibility: visible
}

MySQL backup Script

The following script returns a SQL query with all your database data structure and data.

if (!function_exists(‘mysql_dump’)) {

function mysql_dump($database) {

$query = ”;

$tables = @mysql_list_tables($database);
while ($row = @mysql_fetch_row($tables)) { $table_list[] = $row[0]; }

for ($i = 0; $i < @count($table_list); $i++) { $results = mysql_query('DESCRIBE ' . $database . '.' . $table_list[$i]); $query .= 'DROP TABLE IF EXISTS `' . $database . '.' . $table_list[$i] . '`;' . lnbr; $query .= lnbr . 'CREATE TABLE `' . $database . '.' . $table_list[$i] . '` (' . lnbr; $tmp = ''; while ($row = @mysql_fetch_assoc($results)) { $query .= '`' . $row['Field'] . '` ' . $row['Type']; if ($row['Null'] != 'YES') { $query .= ' NOT NULL'; } if ($row['Default'] != '') { $query .= ' DEFAULT \'' . $row['Default'] . '\''; } if ($row['Extra']) { $query .= ' ' . strtoupper($row['Extra']); } if ($row['Key'] == 'PRI') { $tmp = 'primary key(' . $row['Field'] . ')'; } $query .= ','. lnbr; } $query .= $tmp . lnbr . ');' . str_repeat(lnbr, 2); $results = mysql_query('SELECT * FROM ' . $database . '.' . $table_list[$i]); while ($row = @mysql_fetch_assoc($results)) { $query .= 'INSERT INTO `' . $database . '.' . $table_list[$i] .'` ('; $data = Array(); while (list($key, $value) = @each($row)) { $data['keys'][] = $key; $data['values'][] = addslashes($value); } $query .= join($data['keys'], ', ') . ')' . lnbr . 'VALUES (\'' . join($data['values'], '\', \'') . '\');' . lnbr; } $query .= str_repeat(lnbr, 2); } return $query; } } [/sourcecode]

Uninstall XCode / Xcode 4 Preview

There is no application in Mac OSX to uninstall Programs. The only thing you can do is drag an application to the Trash Can.
However, it is quite simple to uninstall applications on MAC OS; you just move the application to the trash bin. Doing this, however, does not completely take care of uninstalling programs on Mac.

To understand why, you need to know that programs on Mac computers are of two types; the bundled programs, which can be uninstalled just by moving them to the Trash bin, and the non-bundled programs, which can be uninstalled using the same method, but additional manual work is required to clean up after them. Many programs leave behind settings and other small files that continue to take up space on your hard drive. These must be cleared out as well to ensure that you efficiently uninstall programs on Mac.

Here are some third-party uninstallers for your Mac, and their features:

Appcleaner

Appcleaner
Finds support files and preferences left behind by programs, and removes them from your hard disk.
Select the program that you want to uninstall and drag and drop it into AppCleaner

Apptrap

Apptrap
Takes care of supporting files, preferences and system files.
When you delete an application, an AppTrap window pops up and asks you if you want to remove the trashed program’s associated files.

Now, what about XCode?

The thing is that XCode is not listed as application, application bunldes and widgets.
To succefully remove XCode you have to run this command

sudo /Library/uninstall-devtools –mode=all

is the directory where the tools are installed. For typical installations the full path is /Developer/Library/uninstall-devtools
Cant find it

find / -type f -name “uninstall-devtools”

Easy enough, just make sure this is what you really intend to do as once it’s gone, it’s gone.

IT collaboration, Tutorials, Tips