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
package auth | |
import ( | |
"encoding/json" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net" | |
"net/http" | |
"net/url" |
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/env bash | |
basedir=$PWD | |
for dir in $(find "$basedir" -mindepth 1 -maxdepth 4 -type d); do | |
[ -d "$dir/.git" ] && echo $dir && cd $dir && git pull && cd .. | |
done |
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/env bash | |
name="sql2017" | |
volume=sqlvolume | |
function initService { | |
if [ ! "$(docker ps -q -f name=$name)" ]; then | |
echo -n "SQL Server SA password: " |
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 ( | |
[Parameter(Mandatory = $false)] | |
[ValidateNotNullOrEmpty()] | |
[ValidateSet('Install', 'Uninstall', 'Start', 'Stop', 'Status', 'Info', 'Open', 'Deploy', 'Upgrade', 'Help')] | |
[String]$rootCmd | |
) | |
function Download-File{[CmdletBinding()]param($url, $targetFile, $proxy) | |
Write-Verbose "Downloading '${url}' to '${targetFile}'" | |
$uri = New-Object "System.Uri" "$url" |
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('dbo.IndexSize', 'FN') is not null | |
begin | |
drop function dbo.IndexSize | |
end | |
go | |
create function [dbo].[IndexSize](@object_id int) | |
returns float | |
as | |
begin | |
declare @PageSize float |
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('dbo.DataSize', 'FN') is not null | |
begin | |
drop function dbo.DataSize | |
end | |
go | |
create function dbo.DataSize(@object_id int) | |
returns float | |
as | |
begin | |
declare @PageSize float |
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 function dbo.GetQueueCount() | |
returns table | |
as | |
return | |
select q.name, | |
p.rows | |
from sys.objects as o | |
inner join sys.partitions as p | |
on p.object_id = o.object_id | |
inner join sys.objects as q |
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('dbo.FastCount', 'FN') is not null | |
begin | |
drop function dbo.FastCount | |
end | |
go | |
create function dbo.FastCount(@object_id int) | |
returns bigint | |
as | |
begin | |
declare @fastcount bigint = 0 |
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
# Copyright 2015 Google Inc. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
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
#!/bin/bash | |
cat > ./internal-sc.json <<EOL | |
[ | |
{ | |
"protocol": "all", | |
"destination": "172.16.0.0/16" | |
} | |
] |
NewerOlder