Skip to content

Instantly share code, notes, and snippets.

View fischerscode's full-sized avatar
🏠
Working from home

Maximilian Fischer fischerscode

🏠
Working from home
View GitHub Profile
@fischerscode
fischerscode / install.md
Created October 25, 2023 12:22
Installing Miniconda

Installation

  1. Installiere Miniconda
  2. Öffne die Eingabeaufforderung und teste mit conda -V die Installation.
  3. Erstelle eine neue Python Testumgebung: conda create --name python-lernen
  4. Aktiviere die Umgebung: conda activate python-lernen
  5. Installiere JupyterLab: conda install -c conda-forge jupyterlab
  6. Starte JupyterLab: jupyter lab
    • Es müsste sich automatisch ein Browserfenster öffnen. (manuell)
  7. Öffne Links einen beliebigen Ordner und Erstelle mit grafik -> grafik ein Jupyter Notebook.
# serverpod_cli would use this to tell the developer what
# a recommended steps subset does.
comment: Migrate from current to target
# A list of steps, that have to be performed, in order to
# migrate from current to target.
# If a step fails, the transaction is canceled and the migration failed.
# Tables might be prefixed with the schema. If not, `public` is assumed.
steps:
- renameTable:
@fischerscode
fischerscode / serverpod_test_server.json
Last active March 21, 2023 12:03
getCurrentDatabaseDefinition for serverpod_test_server
{
"name": "serverpod_test",
"tables": [
{
"name": "serverpod_auth_key",
"schema": "public",
"tableSpace": null,
"columns": [
{
"name": "id",
@fischerscode
fischerscode / table_definition.yaml
Created March 20, 2023 10:18
Serverpod table definition - 1
# Alternatively, CONSTRAINTs could be represented directly.
# This however might require polymorphism.
# yaml-language-server: $schema=https://go.fischerscode.com/serverpod-schema
### The definition of a (desired) table in the database.
class: TableDefinition
fields:
### The table name
tableName: String
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Protocol file definition",
"oneOf": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "protocol file with fields",
"description": "class or exception",
"oneOf": [
{
<mxfile host="app.diagrams.net" modified="2022-11-08T00:20:26.167Z" agent="5.0 (Macintosh)" etag="mD3JkrJ4J5qzCa1Aji5g" version="20.5.3" type="device"><diagram id="50Z8j9QIt7mUmtRq36Iw" name="Seite-1">7Zjdb9owEMD/mjy2ygefjyXt1kl06sbD9la5yZF4dWzmmAL963fGNiGklLYUMW1ISMTnO+fufmfO2IviYv5Zkkl+I1JgXuincy+69MIwaIUd/NKShZF0+20jyCRNrVIlGNEnsELfSqc0hbKmqIRgik7qwkRwDomqyYiUYlZXGwtWf+uEZNAQjBLCmtIfNFW5kfbCbiW/Bprl7s1Bp29mCuKUbSRlTlIxWxNFV14USyGUeSrmMTCdPJcXY/dpy+zKMQlcvcbgup0kdz9vaDES8fDr70X326+7s6BllnkkbGojHtJSWY/VwqWhnNGCEY6jwVhwNbIzPo6TnLJ0SBZiqt0oFUke3GiQC0mfUJ8wnApQgNNSWcpYGusaI21p15RQos6tiy3YEN2QeU1xSErlvBGMkUlJ75f+acOCyIzygVBKFFaJMJpxfE5wLZAuJuMVZiQa2KSAVDDfmu5gBRGrH0QBSi5QxRp0LXZb91HHjmdVFQVOltcryFavrdxstXQFFx8s37ewbjdYf1FQoCRo8Ma41RKXFA8QCyYwS5dcmAKgjG2IyglJKM+GMNZRtCrJdxuYFgnM55gtt0BO0xS45icUUeR+VUwTQblaBt4e4AfzE/vnba+NPsU4DqoxfrS6VLHg6CahSyyAlTADXQ01puFrmb6wSZqkLVr3E7eLbOQfCmxnG9jwBHYPsO2jg+1uAxudwO4Btnd0sL1T2z1M220FG323e/y+2z/13fft4t7f3Xfdyf7Udz8W7NH7rgvk1Hc/FuzR+24YNsA2gAJPL/TFQcUsV4VrpFJMeQqpZWBsIW1cIWx0K1x
@fischerscode
fischerscode / example_class.dart
Last active October 10, 2022 18:26
Serverpod generated example class.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:serverpod/serverpod.dart' as _i1;
import 'package:serverpod/protocol.dart' as _i2;
import 'package:serverpod_auth_server/module.dart' as _i3;
import 'package:serverpod_serialization/serverpod_serialization.dart' as _i4;
class Example extends _i1.TableRow {
Example({
this.id,
required this.name,
test test test
@fischerscode
fischerscode / links.md
Created November 10, 2021 21:13
Fahrad Refarat Quellen
@fischerscode
fischerscode / generate_password.sh
Last active September 10, 2021 19:27
Generate a random password using urandom. eg. `./generate_password.sh 32`
#!/bin/bash
LC_ALL=C tr -dc 'A-Za-z0-9!#$%&()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c $1 ; echo