Skip to content

Instantly share code, notes, and snippets.

View tkoenig89's full-sized avatar

Tobias König tkoenig89

View GitHub Profile
@tkoenig89
tkoenig89 / JsonSchemaGenerator.cs
Created June 16, 2023 22:26
A basic JsonSchemaGenerator
public class JsonSchemaGenerator
{
public JsonSchema GenerateSchema(Type type)
{
if (type == typeof(string))
{
return new JsonSchema { Type = "string" };
}
else if (type == typeof(int) || type == typeof(decimal) || type == typeof(double))
{
// ==UserScript==
// @name Azure Portal Hotkeys (Fix for german keyboards)
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Enables hotkeys for the azure portal which are broken for german keyboards
// @author Tobias König
// @match https://portal.azure.com/*
// @icon https://www.google.com/s2/favicons?domain=azure.com
// @grant none
// ==/UserScript==
const { createMacro } = require('babel-plugin-macros');
const path = require('path');
const fs = require('fs');
module.exports = createMacro(htmlImportFn);
/**
*
* @param {{references:{default: (import('@babel/traverse').NodePath)[]}, state:any, babel: {types: (import('@babel/core').types)}} param0
*/
function htmlImportFn({ references, state, babel: { types: t } }) {
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+shift+[Minus]",
"command": "workbench.action.terminal.focusNext"
},
{
"key": "ctrl+shift+0",
"command": "workbench.action.terminal.focusPrevious"
},
{
"typescript.updateImportsOnFileMove.enabled": "always",
"telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false,
"terminal.integrated.fontFamily": "Ubuntu Mono",
"terminal.integrated.fontSize": 16,
"breadcrumbs.enabled": true,
"npm.enableScriptExplorer": true,
"editor.multiCursorModifier": "ctrlCmd"
}
## Virtual Environment
python3 -m venv <path>
source <path>/bin/activate
## Load dependencies
pip install -r requirenments.txt
JPG Compression
https://github.com/google/guetzli/
https://zeit.co/now
Auf dem USB Stick eine Ordnerstruktur anlegen, die einfach gebackupt werden kann:
Mit "=>" soll verdeutlicht werden wo die Dateien im Dockercontainer hingemounted werden sollen
USB Dateisystem unter "/mnt/usb":
/docker
/certs
cert.pem => /certs/cert.pem
key.pem => /certs/key.pem
/mosquitto
/etc
@tkoenig89
tkoenig89 / Docker Basics
Last active May 11, 2017 05:34
My notes
https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/
https://www.brianchristner.io/docker-image-base-os-size-comparison/
http://www.developer.com/design/a-guide-to-docker-image-optimization.html
https://entwickler.de/online/development/docker-basics-system-level-virtualisierung-125514.html
Graphical UI
https://github.com/shipyard/shipyard
>>https://github.com/portainer/portainer<<
raspi-image: >>portainer/portainer:arm<<