Skip to content

Instantly share code, notes, and snippets.

View Paul2708's full-sized avatar
😇
Here we go.

Paul Hoger Paul2708

😇
Here we go.
  • Karlsruhe Institute of Technology (KIT)
  • Karlsruhe, Germany
  • 01:13 (UTC +02:00)
View GitHub Profile
@Paul2708
Paul2708 / App.css
Created May 15, 2024 16:35
Valorant Navigation using React and TailwindCSS
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
html, body, label {
font-family: "Barlow Condensed", sans-serif;
}
@Paul2708
Paul2708 / PermissionCheckerPlugin.java
Created April 3, 2024 07:50
Keep Holding Right-Click to Perform an Action
package de.paul2708.permissionchecker;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.command.CommandExecutor;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.plugin.java.JavaPlugin;
@Paul2708
Paul2708 / Example.ipynb
Created October 25, 2023 17:42
A Jupyter Notebook playground for German word embeddings
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Paul2708
Paul2708 / writeup.md
Last active October 8, 2023 19:51
Writeup of Natas Challenge (by OverTheWire)

Writeup of the Natas Challenge (by OverTheWire)

OverTheWire provides wargames that aim to teach basic to advanced knowlendge in different topics in IT security. Natas focuses on serviceside web-security. The setup of the level is described in the following:

  • The goal is to find a password that is required to access the next level.
  • The password is also stored in the file /etc/natas_webpass/natas<level>.
  • There is no SSH login required. Thus, the password must be obtained through using the website.
  • Often, the serverside code is given.
@Paul2708
Paul2708 / Utility.java
Created July 6, 2022 09:40
Fire Spigot listeners for specific players only.
public void registerListener(Listener playerEventListener, Predicate<Player> playerPredicate) {
RegisteredListener registeredListener = new RegisteredListener(playerEventListener, (listener, event) -> {
for (Method method : listener.getClass().getMethods()) {
if (method.isAnnotationPresent(EventHandler.class)) {
if (!method.getParameterTypes()[0].equals(event.getClass())) {
return;
}
if (PlayerEvent.class.isAssignableFrom(method.getParameterTypes()[0])) {
Player player = ((PlayerEvent) event).getPlayer();
@Paul2708
Paul2708 / questions.md
Last active August 7, 2021 15:55
Mögliche Prüfungsfragen zur Vorlesung "Datenbanksysteme" @ KIT (SS 21)

Mögliche Prüfungsfragen zur Vorlesung "Datenbanksysteme" @ KIT (SS 21)

Kapitel 1: Einleitung

  1. Was für Probleme bringt Datenhaltung ohne Datenbanken mit sich?
  • Datenredundanz und Funktionalitätsredundanz
  • Transaktionseigenschaften (z.B. Atomarität) müssen selbst entwickelt und sichergestellt werden
  • physische Datenabhängigkeit, d.h. die physische Repräsentation der Daten (Tabelle, Spalten, Zeilen) muss bekannt sein
  • Datenschutz und Datensicherheit muss gewährleistet werden
  1. Wie profitiert ein Anwendungsentwickler von der Verwendung von Datenbanktechnologie?

Die grundlegenden Datenbankfunktionen müssen nicht selbstständig entwickelt werden -> Fokus auf die eigentliche Anwendung

@Paul2708
Paul2708 / BlockHitBow.java
Created May 20, 2021 08:08
Special bow model for the Spigot game BowBash
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
public interface BlockHitBow extends GameBow {
void onHit(Player shooter, Block block);
}
@Paul2708
Paul2708 / DijkstraAlgorithm.java
Created February 25, 2021 22:11
Dijkstra implementation in Java to find shortest paths in graphs.
package de.paul2708.test.graph.dijkstra;
import java.util.*;
import java.util.stream.Collectors;
public final class DijkstraAlgorithm<V> {
private final Set<V> vertexes;
private final Set<Edge<V>> edges;
@Paul2708
Paul2708 / WordReveal.java
Created February 20, 2021 08:58
Reveals a word char by char
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class WordReveal {
public static final char PLACEHOLDER = '_';
/**
* Reveal a word char by char.
@Paul2708
Paul2708 / duplicate_image.py
Created December 23, 2020 18:30
Delete duplicated images in a directory based on their SHA256 hash value
import imagehash as imagehash
from PIL import Image
import os
def hash_file(name: str):
return imagehash.average_hash(Image.open(name))
directory = "C:\\a\\b\\c"