Skip to content

Instantly share code, notes, and snippets.

View emilekm's full-sized avatar

Emil Maruszczak emilekm

View GitHub Profile
@emilekm
emilekm / buf.c
Created January 3, 2022 14:42
Queue buffer for STM32
#define BUF_SIZE 16
enum {
BUF_INSERT_SUCCESS = 0
BUF_ERR_FULL
}
int8_t buf[BUF_SIZE];
uint8_t front = 0;
uint8_t rear = 0;
@emilekm
emilekm / gpg-import-and-export-instructions.md
Created March 13, 2021 11:44 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@emilekm
emilekm / README.md
Last active September 10, 2019 11:44
[WIP] New PR community/server sketch

This document describes my vision on what is expected of this new PR community/server.

The whole idea comes out of PRTA not handling some of the issues (mainly lack of transparency on handling issues and hitreg). Second issue (hitreg) should be fixed by either using Windows machine or Linux without containerization (requires testing).

The transparency is a backbone of this community. Everything that is being written down should be considered public knowledge and participants should feel responsible for their words.

I decided to use a ticketing system for player<->administration interaction (appeals, reports). I implemented the ideas using Github organization here. The use of a ticketing system discourages any rubish/offtopic discussion, since there is no space for that. This also implies that forum software could be used for this type of interactions between associated players (members) in future, for now I'd like

@emilekm
emilekm / warmode.py
Last active January 19, 2020 09:52
PR:BF2 Warmode Script
# Warmode Script v1.1 29.12.2018
# Coders: Rage, cassius23
# This script is a rework of original script by Rage
# https://www.realitymod.com/forum/showthread.php?p=2036474
from collections import OrderedDict
import host
import game.realityadmin as radmin
@emilekm
emilekm / 1-communication.md
Last active July 10, 2017 10:58
PRTA PR server rule set

Communication

  1. All players must have a working microphone and correctly configured Mumble.

  2. Do not spam allchat, Mumble or the CommoRose at any time.

  3. English is the server language.

  4. !r is only to be used for reporting problems on the server. Spamming it, or abusing it for any other reason is prohibited.

import host
import bf2
import realitycore as rcore
from realitygamemode import getCurrentGameMode
CAPTURE_FLAG = True
LOST_FLAG = True