source Save the following as a .vbs Option Explicit Dim objshell,path,DigitalID, Result Set objshell = CreateObject(“WScript.Shell”) ‘Set registry key path Path = “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\” ‘Registry key value DigitalID = objshell.RegRead(Path & “DigitalProductId”) Dim ProductName,ProductID,ProductKey,ProductData ‘Get ProductName, ProductID, ProductKey ProductName = “Product Name: ” & objshell.RegRead(Path & “ProductName”) ProductID = “Product ID: ” & objshell.RegRead(Path & “ProductID”) ProductKey = “Installed Key:… Read more →
Category: admin
Dealing with a MySQL warning from my hosting provider
I got a warning email from my hosting company today MySQL Quota DB: has used 136.87 MB out of 50 MB limit After some research I discovered that 2 database tables used by Apocalypse Meow are using approx. 120MB. I resolved the issue: Delete the data: open Apocalypse Meow settings page and click Purge ALL data Reclaim the disk space:… Read more →
Markdown and Prettify V2
Install the smart syntax plugin Go to Smart Syntax settings tab and ensure that Custom Skin is ticked Remove the following from smart-syntax/includes/functions.php: remove all 3 lines ?> <script>prettyPrint()</script> <?php Open file wp-content/plugins/smart-syntax/assets/css/smart_syntax.css and replace the contents with this: .prettyprint .com { color: #008000; } .prettyprint .str, .tag { color: #A31515; } .prettyprint .kwd, .atv { color: #0000FF; } .prettyprint… Read more →
How to test a database connection
Create a blank text file called something along the lines of TestConnection.udl Double click the file Test! Read more →
Find Domain Group Members
Win+R Rundll32 dsquery.dll OpenQueryWindow or dsquery group domainroot -name groupname | dsget group -members | dsget user -fn -ln Read more →
SourceSafe lost password
Open um.dat with a hex editor change to the following (ensure that exists 41 64 6d 69 6e) 0000080 55 55 bc 7f 41 64 6d 69 6e 00 00 00 00 00 00 00 0000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000A0 00 00 00 00 90 6e 00… Read more →
Sql Maintenance Scripts
I’m adding the links here in the hope that I stop losing them! Backup Integrity Check Index and Statistics Maintenance MaintenanceSolution.sql Read more →
Preventing Automatic Restart for Windows Updates on Windows 8
To prevent Windows 8 automatic restart for Windows updates, administrators must follow the steps given as below: 1. Log on to Windows 8 computer with the account that has elevated privileges. 2. Click Desktop tile from the Start screen to view the desktop. 3. On the desktop screen, press the Windows + R keys simultaneously to initiate the Run command… Read more →
Restore A SQL User After a SQL Database Restore
Find missing users: EXEC sp_change_users_login ‘Report’ Create the user if it does not exist: CREATE LOGIN ‘UserName’ WITH PASSWORD= ‘password’ Restore the user: EXEC sp_change_users_login ‘Update_One’, ‘UserName’, ‘UserName’ Read more →
markdown in WordPress – AT LAST!!!!!
Here’s some normal text interspersed with some Code, some italics and bold. a quote some sql select a.FILEID, [FILE_SIZE_MB] = convert(decimal(12,2),round(a.size/128.000,2)), [SPACE_USED_MB] = convert(decimal(12,2),round(fileproperty(a.name,’SpaceUsed’)/128.000,2)), [FREE_SPACE_MB] = convert(decimal(12,2),round((a.size-fileproperty(a.name,’SpaceUsed’))/128.000,2)) , NAME = left(a.NAME,15), FILENAME = left(a.FILENAME,30) from dbo.sysfiles a some code [TestFixture] public class ScrewdriverTests { [Test] public void Container_ExplicitRegistration1_ReturnsExpectedClass() { Container container = new Container(); container.Register(typeof(IScrewdriver<FlatHead>), typeof(FlatHeadScrewdriver)); var screwdriver = container.GetInstance(typeof(IScrewdriver<FlatHead>));… Read more →