GeekZilla
Welcome to GeekZilla
Clean a string in C# using RegEx
Clean a string in C# using RegEx public static string CleanString(string input, string replaceWith) { return System.Text.RegularExpressions.Regex.Replace(input, @"[^a-z^0-9^ ^-^_]", replaceWith, System.Text.Re
Paul Hayman - 03 Aug 2016 - 4,106 viewsRendering a Twitter Tweet with Razor and C# MVC4
Rendering a Twitter Tweet with Razor and C# MVC4 Using Linq to Twitter I pulled a feed which I needed to render on a website. The body of the tweet was something like : RT @KristyT: The Floppy Disk means Save, and 14 other old p
Paul Hayman - 01 Apr 2013 - 5,313 viewsGet the progress of active SQL backups using TSQL
Get the progress of active SQL backups using TSQL The following script returns the status of any running backups on Microsoft SQL Server SELECT r.session_id,r.command,CONVERT(NUMERIC(6,2),r.percent_complete) AS [Percent Complete
Paul Hayman - 04 Dec 2012 - 3,815 viewsList all Tables SQL Server
List all Tables SQL Server Here's a tiny bit of SQL for listing all the Tables in a database: SELECT * FROM sys.tables
Paul Hayman - 19 Nov 2012 - 64,955 viewsList all Stored Procedures SQL Server
List all Stored Procedures SQL Server Here's a tiny bit of SQL for listing all the Stored Procedures in a database: SELECT * FROM sys.procedures
Paul Hayman - 13 Nov 2012 - 9,517 viewsSQL Server Database, kill active processes and take it offline
SQL Server Database, kill active processes and take it offline Use the following TSQL to kill the active processes on a database and take it offline. DECLARE @DatabaseName nvarchar(50) SET @DatabaseName = N'databasename' DECL
Paul Hayman - 13 Nov 2012 - 4,122 viewsSelect list of all tables in a MS SQL Server database including row count
Select list of all tables in a MS SQL Server database including row count The following script lists all tables in a database and their row count. SELECT [TableName] = so.name, [RowCount]&n
Paul Hayman - 15 Sep 2012 - 3,207 viewsTruncate all Logs on a SQL Server with TSQL
Truncate all Logs on a SQL Server with TSQL Hers's some T-SQL for truncating all logs on a Microsoft SQL Server: DECLARE @DBName varchar(255) DECLARE @LogName varchar(255) DECLARE @DATABASES_Fetch int DE
Paul Hayman - 15 Sep 2012 - 8,624 viewsEnable 'xp_cmdshell' in SQL server without Surface Area Configuration Tool
Enable 'xp_cmdshell' in SQL server without Surface Area Configuration Tool Here's the script needed for enabling 'xp_cmdshell' on a SQL Server. This allows you to run commands like MKDIR etc from TSQL. EXECUTE SP_CONFIGURE 'show advanced options',
Paul Hayman - 15 Sep 2012 - 2,785 viewsRendering a Gravatar image with Razor and C# MVC4
Rendering a Gravatar image with Razor and C# MVC4 I wanted to write a Helper Extension for Razor which rendered a Gravatar image .. see below: <div class="Author" style="position:relative;"> <div style="position:absolute; top:
Paul Hayman - 05 Sep 2012 - 6,856 viewsEnabling Document Sets in Sharepoint 2010
Enabling Document Sets in Sharepoint 2010 In Central Administration : Required Features I was trying to get Document Sets going in my Enterprise Sharepoint 2010 and came across the following message. The feature being activated is a Site Collection scoped feature which has a dep
Ric Hayman MCPD - 27 Mar 2011 - 5,434 viewsFixing Networking Problems with a Cloned Linux VM
Fixing Networking Problems with a Cloned Linux VM Often when cloning virtual Linux boxes (or using VMWare converter to deploy a virtual appliance) I find that the networking simply doesn't work. eth0 will exist but will not find a network even after checking and double checking /etc/networki
Chris Pont - 10 Aug 2010 - 7,486 viewsOutput Exchange Message Tracking Log to CSV or Excel
Output Exchange Message Tracking Log to CSV or Excel I needed to output the Microsoft Exchange 2010 Message Tracking Log to CSV, here's the Exchange PowerShell command I used: get-messagetrackinglog -Start "07/09/2010 00:00:00" -End "07/09/2010 23:59:00"&
Paul Hayman - 04 Aug 2010 - 15,020 viewsCLR Deployment Fails
CLR Deployment Fails This drove me mad! I was getting this error:- Deploy error SQL01268: .Net SqlClient Data Provider: Msg 325, Level 15, State 1, Procedure 'procedurename', Line 5 Incorr
Ric Hayman MCPD - 26 Jun 2010 - 4,796 viewsDeploying OpenVPN using Group Policy and Active Directory 2008
Deploying OpenVPN using Group Policy and Active Directory 2008 I've recently had an issue using OpenVPN in an organisation where non-Administrator users were given access to their work resources. Usually OpenVPN would be run as an administrative user to allow it to create routes but obviousl
Chris Pont - 22 Apr 2010 - 10,591 viewsSelect a list of databases missing Primary keys
Select a list of databases missing Primary keys The following T-SQL returns a list of tables in a database which have no primary key set. select * from sys.tables where object_id not in ( select o
Paul Hayman - 22 Jan 2010 - 3,506 viewsFTP series codes
FTP series codes Code Description 100 The requested action is being initiated, expect another reply before proceeding with a new command. 110 Restart marker reply. 120 Service ready in nnn minutes. 125 Data connection already open, transfer starting
Paul Hayman - 25 Jun 2009 - 6,505 viewsConditional IE CSS Hack
Conditional IE CSS Hack Great little CSS hack for IE browsers, especially when IE6 browsers are causing problems. .somestyle { height: 15px; #height: 15px; _height: 21px; } The
Andrew Clark - 14 Jan 2009 - 5,173 viewsClearing Vista's saved passwords
Clearing Vista's saved passwords It's great when things just work... and very frustrating when they don't. This is often compounded by unhelpful error messages. An extended error has occurred. I recently was unable to access one of my network shares, and while I suspected the s
Paul Marshall - 21 Nov 2008 - 7,425 viewsTitle Case
ToTitleCase - Making text Title Case Whilst returning some data from LDAP, I found that it was returning in Upper Case, I needed it to be in Title case format. I found this method of converting to title case Title Case converts every first letter of a word in a sentence to upper
Danny Mehmed - 05 Nov 2008 - 6,014 views