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 SCHEMA logs AUTHORIZATION dbo | |
CREATE TABLE [logs].[Errors]( | |
[ErrorId] [int] IDENTITY(1,1) NOT NULL, | |
[UserName] [varchar](100) NULL, | |
[ErrorNumber] [int] NULL, | |
[ErrorState] [int] NULL, | |
[ErrorSeverity] [int] NULL, | |
[ErrorLine] [int] NULL, | |
[ErrorProcedure] [varchar](max) NULL, |
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
# jupyter notebooks | |
.ipynb_checkpoints | |
# terraform | |
terraform/.terraform | |
terraform/variables.tf | |
**/*.tfstate | |
**/*.tfstate.backup | |
# appsettings |
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
$SELECTOR = "" | |
# searching for the pod to connect to by selector and namespace | |
$POD=`kubectl get pods -n $NAMESPACE --selector=$SELECTOR -o jsonpath='{.items[0].metadata.name}'`; | |
Write-Host "POD: " + $POD | |
# starting remote debugger that we installed earlier inside our docker image | |
#kubectl exec $POD -n $NAMESPACE -i -- ../vsdbg/vsdbg --interpreter=vscode; |
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
$registry = "docker.io" | |
$username = "mrjamiebowman" | |
$password = Read-Host "Enter a Password" -MaskInput | |
kubectl create secret docker-registry dockercred --docker-server=$registry --docker-username=$username --docker-password=$password -o jsonpath="{.data.\.dockerconfigjson}" |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: kubernetes-tutorial | |
namespace: mrjamiebowman | |
spec: | |
type: LoadBalancer | |
ports: | |
- port: 80 | |
selector: |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: kubernetes-tutorial | |
namespace: mrjamiebowman | |
labels: | |
app: kubernetes-tutorial | |
spec: | |
replicas: 1 | |
selector: |
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: appsettings | |
namespace: mrjamiebowman | |
data: | |
appsettings.json: |- | |
{ | |
"Logging": { | |
"LogLevel": { |
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
public class SqlPermsHealthCheck : IHealthCheck | |
{ | |
private string sql = @"SELECT | |
p.name, | |
p.schema_id, | |
schema_name = sch.name, | |
has_perms_by_name(p.name, 'OBJECT', 'EXECUTE') as has_execute, | |
has_perms_by_name(p.name, 'OBJECT', 'VIEW DEFINITION') as has_view_definition | |
FROM sys.procedures p | |
LEFT JOIN sys.schemas sch ON sch.schema_id = p.schema_id |
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 | |
# add sbin to path | |
export PATH=$PATH:/usr/sbin/ | |
echo $PATH | |
sudo apt update && sudo apt full-upgrade -y | |
cd /tmp | |
wget https://bootstrap.pypa.io/get-pip.py |
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
public static class ApplicationInfoHelper | |
{ | |
public static string ApplicationName | |
{ | |
get { | |
var name = (((System.Reflection.Assembly.GetExecutingAssembly().FullName).Split()))[0]); | |
return item.Substring(0, name.length - 1); | |
} | |
} |
NewerOlder