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
" ayu light theme | |
let s:white = [ '#fafafa', 234 ] | |
let s:white2 = [ '#ffffff', 236 ] | |
let s:white3 = [ '#f5f5f5', 242 ] | |
let s:text = [ '#6e7580', 253 ] | |
let s:blue = [ '#55b4d4', 75 ] | |
let s:cyan = [ '#4cbf99', 116 ] | |
let s:green = [ '#86b300', 150 ] | |
let s:orange = [ '#fa6e32', 220 ] | |
let s:purple = [ '#a37acc', 183 ] |
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
from typing import Dict, Tuple | |
from pprint import pformat | |
# Example graph | |
graph_slides = { | |
0: {1: 8, 2: 2}, | |
1: {0: 8, 2: 7, 3: 9, 4: 5}, | |
2: {0: 2, 1: 7, 4: 6}, | |
3: {1: 9, 4: 3, 5: 1}, | |
4: {2: 6, 1: 5, 3: 3, 5: 4}, |
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 main | |
import ( | |
"crypto/rand" | |
"fmt" | |
"net" | |
"time" | |
) | |
type morse struct { |
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
import sys | |
import json | |
import base64 | |
def extract(acme_path, extract_domain, out_name): | |
with open(acme_path, "r") as f: | |
acme = json.loads(f.read()) | |
for certificate in acme["Certificates"]: | |
domain = certificate["Domain"]["Main"] |
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: whoami-deployment | |
labels: | |
app: whoami | |
spec: | |
replicas: 3 | |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"strings" | |
"sync" | |
"github.com/aws/aws-sdk-go/aws" |
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
import collections | |
from dataclasses import is_dataclass, asdict | |
from datetime import datetime | |
from ujson import dumps as ujson_dumps | |
def dumps(obj): | |
def convert_to_basic(o): | |
if isinstance(o, dict): |
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
version: "3.1" | |
services: | |
db: | |
image: postgres:11.4-alpine | |
restart: always | |
environment: | |
POSTGRES_USER: gitea | |
POSTGRES_DB: gitea | |
POSTGRES_PASSWORD: gitea | |
volumes: |
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
/********************************************************************/ | |
/* Hochschule fuer Technik und Wirtschaft */ | |
/* Fakultät fuer Ingenieurwissenschaften */ | |
/* Labor fuer Eingebettete Systeme */ | |
/* Mikroprozessortechnik */ | |
/********************************************************************/ | |
/* */ | |
/* C_Übung.C: */ | |
/* Programmrumpf fuer C-Programme mit dem Keil */ | |
/* Entwicklungsprogramm uVision fuer ARM-Mikrocontroller */ |
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
from flask import Flask | |
from flask_mqtt import Mqtt | |
def create_app(): | |
app = Flask(__name__) | |
app.config['MQTT_BROKER_URL'] = 'mosquito.lanarama.local' # use the free broker from HIVEMQ | |
app.config['MQTT_BROKER_PORT'] = 1883 # default port for non-tls connection | |
app.config['MQTT_USERNAME'] = '' # set the username here if you need authentication for the broker | |
app.config['MQTT_PASSWORD'] = '' # set the password here if the broker demands authentication | |
app.config['MQTT_KEEPALIVE'] = 5 # set the time interval for sending a ping to the broker to 5 seconds |
OlderNewer