This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can now send me #bitcoin here: https://onename.io/ekkis | |
Verifying that +ekkis is my Bitcoin username |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if object_id('Split') is not null | |
drop function Split | |
go | |
create function Split(@s varchar(max)) | |
returns @ret table (s varchar(max)) | |
as | |
begin | |
insert @ret select s from SplitByString(@s, ',') | |
return | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using Microsoft.SqlServer.Server; | |
using System.Data.SqlTypes; | |
using System.Text.RegularExpressions; | |
public class SQLREGEX | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$script:dsn = @{ | |
"Data Source" = "{0}"; | |
"Initial Catalog" = "{1}"; | |
"Integrated Security" = "SSPI"; | |
"Application Name" = "PSH Client" | |
} | |
function SQLDSN($srv, $db, $dsn = @{}) { | |
$script:dsn.Keys |%{ if (!$dsn[$_]) { $dsn[$_] = $script:dsn[$_] } } | |
$dsn = $dsn.Keys |%{ "{0}={1}" -f $_, $dsn[$_] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param($fn, [switch] $show = $false, $srv = "localhost", $db = "tempdb", $tb = "ListDictionary") | |
# | |
# - synopsis - | |
# receives a file of jason objects listed one per line, flattens | |
# the structure such that arrays and embedded hashes get promoted | |
# to the top, and generates SQL or runs the SQL to insert the | |
# records into the given database | |
# | |
# - syntax - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# - Synopsis - | |
# | |
# This script allows generation of a call tree on one or more | |
# assemblies and may optionally store said information in database | |
# tables | |
# | |
# - Syntax - | |
# -assemblies {list} | |
# a list of comma-delimited paths. If not provided |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For documentation please refer to: | |
# http://la-elitedocs.elitecorp.com/wiki/index.php?title=Metrics.ps1 | |
# Needs the Visual Studio Code Metrics PowerTool 10.0 installed | |
# http://www.microsoft.com/en-us/download/details.aspx?id=9422 | |
param([switch] $lib = $false, $filter = "*", $inst = "PMQJMDEV", [switch] $debug = $false, [switch] $sql = $false) | |
$global:M = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\Metrics.exe" | |
$global:WebUIBin = "\\la-se-wapi-test\TE_3E_Share\TE_3E_$inst\Inetpub\WebUI\bin" | |
function global:GetMetrics($f) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if object_id('MkPrimaryKey') is not null | |
drop proc MkPrimaryKey | |
go | |
create proc MkPrimaryKey | |
@TblName sysname | |
, @ColNames varchar(max) | |
, @exec bit = 1 | |
, @display bit = 0 | |
as | |
set nocount on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use master | |
go | |
if object_id('sp_dbkill') is not null | |
drop proc sp_dbkill | |
go | |
/* | |
** - synopsis - | |
** Kills all connections active on a given database | |
** | |
** - business requirement - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
create table #counts (name sysname, n int) | |
go | |
declare @s varchar(max) | |
select @s = isnull(@s, '') + ' insert #counts select ''' + name + ''', count(*) from ' + name from sys.tables | |
exec(@s) | |
select * from #counts where n >= 16 order by 2 | |
select * from vpx_object_type | |
select * from vpx_feature | |
select * from vpx_sequence order by id |
OlderNewer