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
server { | |
listen 80; | |
server_name jenkins.somewebsite.com; | |
return 301 https://$host$request_uri; | |
} |
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
version=3.11 | |
build=1 | |
mkdir ~/temp | |
cd ~/temp | |
wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz | |
tar -xzvf cmake-$version.$build.tar.gz | |
cd cmake-$version.$build/ | |
Install the extracted source by running: | |
./bootstrap |
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]; | |
DECLARE @dbName varchar(64) = 'TimeZoneDB' | |
DECLARE @kill varchar(8000) = ''; | |
SELECT @kill = @kill + 'kill ' + CONVERT(varchar(5), session_id) + ';' | |
FROM sys.dm_exec_sessions | |
WHERE database_id = db_id(@dbName) | |
SET @kill = @kill + 'Drop Database ' + @dbName |
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
SELECT * FROM OPENQUERY(DB2,' | |
SELECT | |
COLUMN_NAME AS Name, | |
COLUMN_TEXT AS Description, | |
DATA_TYPE AS TYPE, | |
LENGTH AS Length, | |
NUMERIC_SCALE AS Scale, | |
NUMERIC_PRECISION AS PRECISION, | |
IS_NULLABLE AS Nullable | |
FROM |
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('tempdb.dbo.#space') IS NOT NULL | |
DROP TABLE #space | |
CREATE TABLE #space ( | |
database_id INT PRIMARY KEY | |
, data_used_size DECIMAL(18,2) | |
, log_used_size DECIMAL(18,2) | |
) | |
DECLARE @SQL NVARCHAR(MAX) |
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
Set-ExecutionPolicy Bypass -Scope Process | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServer | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-CommonHttpFeatures | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpErrors | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpRedirect | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-ApplicationDevelopment | |
Enable-WindowsOptionalFeature -Online -FeatureName NetFx4Extended-ASPNET45 | |
Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility45 |
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
SET NOCOUNT ON | |
-- WWB: Create a Temp Table Of All Relationship To Improve Overall Performance | |
CREATE TABLE #TableRelationships (FK_Schema nvarchar(max), FK_Table nvarchar(max), | |
PK_Schema nvarchar(max), PK_Table nvarchar(max)) | |
-- WWB: Create a List Of All Tables To Check | |
CREATE TABLE #TableList ([Schema] nvarchar(max), [Table] nvarchar(max)) | |
-- WWB: Fill the Table List |
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
DECLARE @ColName [varchar](32) = 'EntitledMinutes' | |
SELECT sys.objects.object_id, sys.schemas.name AS [Schema], sys.objects.name AS Object_Name, sys.objects.type_desc AS [Type] | |
FROM sys.sql_modules (NOLOCK) | |
INNER JOIN sys.objects (NOLOCK) ON sys.sql_modules.object_id = sys.objects.object_id | |
INNER JOIN sys.schemas (NOLOCK) ON sys.objects.schema_id = sys.schemas.schema_id | |
WHERE | |
sys.sql_modules.definition COLLATE SQL_Latin1_General_CP1_CI_AS LIKE '%' + @ColName + '%' ESCAPE '\' | |
ORDER BY sys.objects.type_desc, sys.schemas.name, sys.objects.name |
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
git filter-branch --prune-empty --index-filter 'git log --pretty=format: --name-status | grep -i ^D | cut -f2- | sort -u | xargs git rm -r --cached --ignore-unmatch DoesNotExistInMyProject' |
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
#!/usr/bin/bash | |
sudo mkdir /etc/systemd/system/systemd-timesyncd.service.d | |
cat <<EOF | sudo tee /etc/systemd/system/systemd-timesyncd.service.d/clear-condition-virtualization.conf\n[Unit]\nConditionVirtualization=\nEOF | |
sudo systemctl daemon-reload | |
sudo timedatectl set-ntp yes | |
timedatectl | |
OlderNewer