Skip to content

Instantly share code, notes, and snippets.

View Friedjof's full-sized avatar
👨‍💻
at work

Friedjof Noweck Friedjof

👨‍💻
at work
View GitHub Profile
@Friedjof
Friedjof / float2string.c
Last active May 9, 2023 21:33
Convert a float number to a char array in C
// Friedjof Noweck
// 2021-10-30 Sat
float potenzieren(int basis, int potenz);
void float2string(float zahl, char* text);
int stringLength(char* given_string);
float absFloat(float value);
int main()
{
class Zahl:
def __init__(self, n) -> None:
self.n = n
def teiler(self) -> iter:
for i in range(1, self.n):
if self.n % i == 0:
yield i
def ist_prim(self) -> bool:
"""
The script Bool Function:
This is a smale python script to generate a truth table for a boolean function.
The function can be defined by the user as a lambda function or by using the predefined functions.
The predefined functions are: AND, OR, XOR, Implikation, Äquivalenz.
The script can also be used to test the predefined functions with the run_tests() method.
Example:
>>> a = Variable()
>>> b = Variable()
@Friedjof
Friedjof / PinguChat.java
Last active January 19, 2023 20:55
Dies sind ein paar Methden, die eine ROT13 Verschlüsselung optional im PinguChat anbieten.
public boolean isEncrypted(byte[] message) {
return message[0] == '&';
}
public byte[] encrypt(byte[] data) {
if (!isEncrypted(data)) {
return data;
}
byte[] encryptedData = new byte[data.length];
"""
Cache Simulator - written by Friedjof Noweck
This program simulates a cache with a given associativity, cache line size, and cache size.
You can find an example of how to use this program in the main function at the bottom of this file.
This Example simulates a cache with:
- 2, 4 or 8-way associativity
- cache line size of 8 Bytes
- cache size of 128 Bytes
"""

Audible Download

Show Books

audible library list

Download all Books

audible download --aaxc --pdf --cover --cover-size 1215 --chapter --annotation --all
from threading import *
from time import sleep
class States:
loop: bool = False
class Loop(Thread):
def __init__(self, states: States, *args, **kwargs):
@Friedjof
Friedjof / brainfuck.c
Last active May 7, 2023 22:08
This is an interpreter for Brainfuck written in C.
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define PROGRAM_SIZE 8192
#define LOOP_DEPTH 256

How to mount TUM Rechnerhalle using SSHFS

Installation

Ubuntu/Debian:

sudo apt-get install sshfs

CentOS/RHEL:

sudo yum install sshfs

SSH key authentication for the TUM Rechnerhalle

Author: Friedjof Noweck

*write a comment if you have any questions or suggestions

Demonstration

After this guide you should be able to connect to the Rechnerhalle via SSH without a password or username like this:

ssh tum

Steps