Skip to content

Instantly share code, notes, and snippets.

View s-bauer's full-sized avatar

Simon Bauer s-bauer

View GitHub Profile
#!/usr/bin/env python3
import re
from typing import NamedTuple
import paho.mqtt.client as mqtt
from influxdb import InfluxDBClient
INFLUXDB_ADDRESS = '192.168.10.29'
INFLUXDB_USER = 'root'
import SwaggerUI from "swagger-ui-react"
import './App.css';
import React from "react";
import DatePicker from "react-datepicker";
import "swagger-ui-react/swagger-ui.css"
import "react-datepicker/dist/react-datepicker.css";
function App() {
openapi: 3.0.0
info:
version: "{version}"
title: Sample API with anyOf and oneOf
paths:
/test:
get:
parameters:
- in: query
name: afterDate
# Property values can:
# - be overridden by environment variables. The name of the corresponding environment variable is the
# upper-cased name of the property where all the dot ('.') and dash ('-') characters are replaced by
# underscores ('_'). For example, to override 'sonar.web.systemPasscode' use 'SONAR_WEB_SYSTEMPASSCODE'.
# - be encrypted. See https://redirect.sonarsource.com/doc/settings-encryption.html
#--------------------------------------------------------------------------------------------------
# DATABASE
#
# IMPORTANT:
@s-bauer
s-bauer / IIS.ps1
Created November 14, 2019 13:27
List, Stop and Start IIS sites using powershell (Wrapper for appcmd)
function Get-IISSites() {
Set-Alias -Name "appcmd" -Value "$env:SystemRoot\System32\inetsrv\appcmd.exe"
$output = appcmd list site
if($LASTEXITCODE -ne 0) {
throw "You need to be Admin!"
}
$matches = $output | Select-String -pattern "(?<=SITE `").*?(?=`")" -AllMatches
return $matches | ForEach-Object { $_.Matches.Value }
@s-bauer
s-bauer / ConfigureAzureDevopsAgents.ps1
Last active August 4, 2019 11:00
Configure Azure Devops Agents in bulk
param(
[Parameter(Mandatory=$true)] [string] $AzDoTenant,
[Parameter(Mandatory=$true)] [string] $AzDoPAT,
[Parameter(Mandatory=$true)] [string] $AgentPool,
[Parameter(Mandatory=$true)] [string] $WorkDirectory,
[Parameter(Mandatory=$true)] [int] $AgentCount,
[Parameter(Mandatory=$false)] [string] $AgentPrefix = "Agent_"
)
$InformationPreference = "Continue"
<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" />
</head>
<body>
<div id="bot"/>
<script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script>
<script>
var speechOptions = {
GET http://localhost:8080/rooms/user/60 HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Accept: application/json
x-auth-token: 543hPmTeAk43DF3OuWp2NMrT0_DHaMWzYKw8jWjV
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
Referer: http://localhost:8080/swagger-ui.html
Accept-Encoding: gzip, deflate, br
Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: Idea-d71fda39=4b5932ac-0edd-499f-82db-8edddff2487d
>>>>>>>>REQUEST
PUT /users/51 HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 69
Pragma: no-cache
Cache-Control: no-cache
Accept: application/json
x-auth-token: SAiojLPjbwjathzi-olYSp0Y1aDeDmxj21JPLe7_
java -jar .\backend-0.0.1.jar
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/Source/Softwarearchitektur/backend/build/libs/backend-0.0.1.jar!/BOOT-INF/lib/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Source/Softwarearchitektur/backend/build/libs/backend-0.0.1.jar!/BOOT-INF/lib/slf4j-nop-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \