Skip to content

Instantly share code, notes, and snippets.

View marcj's full-sized avatar
🖌️
Data

Marc J. Schmidt marcj

🖌️
Data
View GitHub Profile
@marcj
marcj / log.txt
Created September 30, 2024 16:08
Docker logs minio
goroutine 6295360540 gp=0xc5b476bc00 m=nil [runnable]:
syscall.Syscall(0x102, 0xffffffffffffff9c, 0xc4452971a0, 0x1ff)
syscall/syscall_linux.go:69 +0x25 fp=0xc99a2169f0 sp=0xc99a216990 pc=0x492645
syscall.Mkdirat(0xffffffffffffff9c, {0xc6974a7d00?, 0x412225?}, 0x1ff)
syscall/zsyscall_linux_amd64.go:665 +0x73 fp=0xc99a216a38 sp=0xc99a2169f0 pc=0x4902b3
syscall.Mkdir(...)
syscall/syscall_linux.go:272
os.Mkdir.func1()
os/file.go:304 +0x65 fp=0xc99a216a68 sp=0xc99a216a38 pc=0x4c9605
marc at mpro in /tmp/asdasd
$ git clone https://github.com/deepkit/deepkit-framework.git
Klone nach 'deepkit-framework'...
remote: Enumerating objects: 48921, done.
remote: Counting objects: 100% (11464/11464), done.
remote: Compressing objects: 100% (1611/1611), done.
remote: Total 48921 (delta 10264), reused 10529 (delta 9841), pack-reused 37457
Empfange Objekte: 100% (48921/48921), 68.22 MiB | 4.40 MiB/s, fertig.
Löse Unterschiede auf: 100% (39231/39231), fertig.
#include <functional>
#include <iostream>
#define IMGUI_DEFINE_MATH_OPERATORS
#include "imgui.h"
#include "imgui_internal.h"
#include "imgui_impl_sdl2.h"
#include "imgui_impl_opengl3.h"
@marcj
marcj / form.ts
Created March 20, 2024 21:55
Deepkit Angular 2
/*
* Deepkit Framework
* Copyright (C) 2021 Deepkit UG, Marc J. Schmidt
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the MIT License.
*
* You should have received a copy of the MIT License along with this program.
*/
@marcj
marcj / component.ts
Last active March 20, 2024 21:52
Deepkit Angular form
export class OrderFilter {
order: string = '';
customer: string = '';
article: string = '';
}
@Component({
template: `
@marcj
marcj / app.ts
Created September 24, 2023 16:55
Deepkit dot path to objects serializer
test('dot path to objects', () => {
//given values like { "myArray[0].prop1.prop2": "123" } we want to convert it to { myArray: [{ prop1: { prop2: "123" } }] }
interface MyObject {
myArray: { prop1: { prop2: string } }[];
}
function convertPathObjectToValues(object: { [name: string]: any }): any {
//object has keys like "myArray[0].prop1.prop2"
@marcj
marcj / lstm.py
Last active May 9, 2023 18:28
Mini calculator LSTM
"""
This script tests how good LSTMs are at solving mini calc tasks like 1+2, 3+4, 5*5.
The challenge is that the input is as string and can have arbitrary many whitespaces between the numbers and operator.
"1+2"
" 2 * 4"
" 3 + 3"
To have the problem simple enough, only 1 digit numbers are allowed. So 1+2, but not 11+2. And only 2 operators: + and *.
import { AbstractControl, FormArray, FormControl, FormControlOptions, FormControlState, FormGroup, ValidationErrors, ValidatorFn } from "@angular/forms";
import { ClassType, isFunction } from "@deepkit/core";
import {
deserialize,
getValidatorFunction,
hasDefaultValue,
isCustomTypeClass,
isOptional,
isType,
ReflectionClass,
@marcj
marcj / diff.patch
Last active July 8, 2022 21:21
NX watch bug
~
diff --git a/apps/frontend/src/app/app.tsx b/apps/frontend/src/app/app.tsx
index 0a2d3c2..7df6a6e 100644
--- a/apps/frontend/src/app/app.tsx
+++ b/apps/frontend/src/app/app.tsx
@@ -1,9 +1,11 @@
import React, { useEffect, useState } from 'react';
-import { Message } from '@foo23/api-interfaces';
+import { Message, User } from '@foo23/api-interfaces';
type Command =
'foo0'
| 'foo1'
| 'foo2'
| 'foo3'
| 'foo4'
| 'foo5'
| 'foo6'
| 'foo7'
| 'foo8'