Skip to content

Instantly share code, notes, and snippets.

kulmam92

Block or report user

Report or block kulmam92

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kulmam92
kulmam92 / script_out_snowflake_database_objects.py
Created Oct 5, 2019
Generate DDL including permission of objects in a given Snowflake database into separate files
View script_out_snowflake_database_objects.py
import os
import shutil
import subprocess
import time
from datetime import datetime
import snowflake.connector
import logging
# Information for Snowflake
SNOWSQL_ACCOUNT = "XXXXXXXXX.east-us-2.azure"
@kulmam92
kulmam92 / Dockerfile.msbuild
Created Jul 6, 2018 — forked from alexellis/Dockerfile.msbuild
Dockerfile for MSBuild / ASP.NET
View Dockerfile.msbuild
# Customize / optimize as necessary.
# This could probably change to plain Windows Server Core as a base-image.
FROM microsoft/iis:10.0.14393.206
SHELL ["powershell"]
RUN Invoke-WebRequest "https://download.microsoft.com/download/9/B/B/9BB1309E-1A8F-4A47-A6C5-ECF76672A3B3/BuildTools_Full.exe" -OutFile "$env:TEMP\net.exe" -UseBasicParsing
RUN & "$env:TEMP\net.exe" /Silent /Full
RUN Install-WindowsFeature NET-Framework-45-ASPNET ; \
View msbuild-sample.proj
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WorkingDirectory>$(WORKSPACE)</WorkingDirectory>
<EnvironmentName>$(Environment)</EnvironmentName>
<devEnvTool Condition="'$(devEnvTool)'==''">C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe</devEnvTool>
</PropertyGroup>
<!--Build using Devenv.exe-->
<!--MSBuild Batching: Target batching (Outputs)-->
@kulmam92
kulmam92 / GetLastChangeLogfromGroovyPostBuild.groovy
Last active May 13, 2016
Get top n bytes from the last change log using Groovy PostBuild
View GetLastChangeLogfromGroovyPostBuild.groovy
import hudson.FilePath;
// Size(in byte) of log that you want to display.
def logLength = 400
def myBuildStatus = manager.build.result.toString()
//manager.listener.logger.println("$myBuildStatus");
//manager.logContains("^Build FAILED.")
if(myBuildStatus == "SUCCESS") {
@kulmam92
kulmam92 / GetLastNlinesfromLogFile.groovy
Last active May 9, 2016
Display last changed log file in the workspace of Jenkins build - parameter : workSpace -> $workspace
View GetLastNlinesfromLogFile.groovy
def myWorkdSpace = "$workSpace"
def files = buildFileList(myWorkdSpace)
def buildFileList(dirname) {
def files = [:]
def dir = new File(dirname)
if( dir.directory ) {
dir.listFiles().each {
def path = it.absolutePath
if( it.directory ) {
View gist:aac56833c0c707b7a928
#install SqlServer and TFS
cinst VisualStudioTeamFoundationServerExpress2013
cinst MsSqlServer2012ExpressWithReporting
#Configure SQL Reporting Services
$rsConfig = (Get-WmiObject `
-namespace "root\Microsoft\SqlServer\ReportServer\RS_MSSQLSERVER\v11\admin" `
-class "MSReportServer_ConfigurationSetting")
#Configuring Reporting Server Virtual Directories
@kulmam92
kulmam92 / Install-ISPackage.ps1
Created Apr 8, 2015
Installs an SSIS package to a SQL Server store - archiving from http://sev17.com/2012/11/06/scripting-ssis-package-deployments/
View Install-ISPackage.ps1
#######################
<#
.SYNOPSIS
Installs an SSIS package to a SQL Server store.
.DESCRIPTION
The Install-ISPackage script installs an Dtsx file to a SQL Server store using the command-line utility dtutil.
Works for 2005 and higher
.EXAMPLE
./install-ispackage.ps1 -DtsxFullName "C:\Users\Public\bin\SSIS\sqlpsx1.dtsx" -ServerInstance "Z001\SQL1" -PackageFullName "SQLPSX\sqlpsx1"
This command install the sqlpsx1.dtsx package to SQL Server instance Z001\SQL1 under the SQLPSX folder as sqlpsx1. If SQLPSX folder does not exist it will be created.
View Job_FailaureMonitoring.sql
CREATE PROC [dbo].[Job_FailaureMonitoring]
@HourInterval int = 24
,@recipients varchar(4000)
,@profile_name nvarchar(128)
,@debug bit = 0
AS
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
BEGIN TRY
declare @body varchar(max)
@kulmam92
kulmam92 / EmailLastFailedStep_SendErrorMessage.sql
Last active Aug 29, 2015
How to get detailed error message of last step when job failed.
View EmailLastFailedStep_SendErrorMessage.sql
USE [msdb]
GO
CREATE PROC [dbo].[EmailLastFailedStep_SendErrorMessage]
@JobName nvarchar(128)
,@recipients varchar(4000)
,@profile_name nvarchar(128)
,@debug bit = 0
AS
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
@kulmam92
kulmam92 / DB.Schema.SVNCheckin.bat
Created Sep 23, 2013
Check in DB schema to SVN using SQLCompare.
View DB.Schema.SVNCheckin.bat
SVN add --username MyUser --password MyUserP@ss --force * --auto-props --parents --depth infinity
SVN commit --username MyUser --password MyUserP@ss -m "Daily Checkin"
You can’t perform that action at this time.