Skip to content

Instantly share code, notes, and snippets.

View SBajonczak's full-sized avatar
🍇

Sascha Bajonczak SBajonczak

🍇
View GitHub Profile
@SBajonczak
SBajonczak / TestWAS.ps1
Created June 12, 2016 06:13
Test the convertion of documents with WAS in SharePoint
$AppName=“Word Automation Services”
$timerJobName=“Word Automation Services”
$SiteUrl=“http://portal.contoso.com”
$WordDoc=“/Freigegebene%20Dokumente/Fdsfsfd.docx”
$PDF=“/Freigegebene%20Dokumente/test.pdf”
asnp *sh*
Write-Host -BackgroundColor Green -ForegroundColor Yellow “ — Test Word Automation Service — ”
write-host “”
$WASinstance=Get-SPServiceInstance | ?{$_.typename -eq “Word Automation Services”}
@SBajonczak
SBajonczak / DeleteTables.sql
Created March 23, 2018 10:51
Delete all Tables from current mysql database
SET FOREIGN_KEY_CHECKS = 0;
SET GROUP_CONCAT_MAX_LEN=32768;
SET @tables = NULL;
SELECT GROUP_CONCAT('`', table_name, '`') INTO @tables
FROM information_schema.tables
WHERE table_schema = (SELECT DATABASE());
SELECT IFNULL(@tables,'dummy') INTO @tables;
SET @tables = CONCAT('DROP TABLE IF EXISTS ', @tables);
PREPARE stmt FROM @tables;
@SBajonczak
SBajonczak / main.cpp
Created December 18, 2019 11:12
ChristmasTown
#include <Homie.h>
#include <Ticker.h>
#define FW_NAME "bochumsba-iot-fw";#
##define FW_VERSION "2.0.0"
const int PIN_Church = 2;
const int PIN_TownHall = 0;
const int PIN_House1 = 4;
const int PIN_House2 = 16;
@SBajonczak
SBajonczak / ino.cpp
Created December 26, 2019 10:12
Scale Tare Measurements
/*
Open Hive | Scale Adjustment
----------------------------
| Scale ADC HX711
pins hard coded
---------------
D15 D14 Dout, SCK
*/
@SBajonczak
SBajonczak / PowerShell Profile
Last active September 13, 2021 10:03
Custom PowerShell Profile that contains OmyPosh and some custom git aliasses
if (Get-Module -ListAvailable -Name oh-my-posh) {
}
else{
Install-Module oh-my-posh -Scope CurrentUser -AllowPrerelease
}
@SBajonczak
SBajonczak / Dockerfile
Created September 30, 2021 11:11
Dockerfile for generating diagrams (with https://diagrams.mingrammer.com/)
MAINTAINER Sascha Bajonczak <xbeejayx@hotmail.com>
FROM python:3.9
RUN apt-get -qq update; \
apt-get install -qqy \
graphviz
RUN pip install diagrams
RUN mkdir -p data
COPY data/diagramdata.py ./data
@SBajonczak
SBajonczak / docker-compose.yml
Last active October 5, 2021 12:48
Docker Compose for Sonarcube and Postgres
version: '3.3'
services:
postgres:
container_name: sonar-postgres
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
ports:
- '5432:5432'
networks:
@SBajonczak
SBajonczak / DockerMsSqlFT
Created October 22, 2021 10:45
Dockerfile to Create a SQL Server with fulltext support
# mssql-agent-fts-ha-tools
# Maintainers: Microsoft Corporation (twright-msft on GitHub)
# GitRepo: https://github.com/Microsoft/mssql-docker
# Base OS layer: Latest Ubuntu LTS
FROM ubuntu:16.04
# Install prerequistes since it is needed to get repo config for SQL server
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
@SBajonczak
SBajonczak / docker-compose.yml
Created December 12, 2021 20:22
Falcon Christmas
version: "3"
services:
FALCON:
image: falconchristmas/fpp
container_name: falcon
restart: always
volumes:
- "/docker/fpp/media:/home/fpp/media"
- "/docker/fpp/modprobe:/etc/modprobe.d"
ports:
@SBajonczak
SBajonczak / IndexSize.sql
Created December 14, 2021 11:52
Get Index Size for each table in the Database
SELECT i.[name] AS IndexName
,SUM(s.[used_page_count]) * 8 AS IndexSizeKB
FROM sys.dm_db_partition_stats AS s
INNER JOIN sys.indexes AS i ON s.[object_id] = i.[object_id]
AND s.[index_id] = i.[index_id]
GROUP BY i.[name]
ORDER BY i.[name]