Skip to content

Instantly share code, notes, and snippets.

@wkktoria
wkktoria / Cabinet.java
Created October 15, 2025 11:38
2025.rekrutacja.jjd
import java.util.List;
import java.util.Optional;
interface Cabinet {
// zwraca dowolny element o podanej nazwie
Optional<Folder> findFolderByName(String name);
// zwraca wszystkie foldery podanego rozmiaru SMALL/MEDIUM/LARGE
List<Folder> findFoldersBySize(String size);
@wkktoria
wkktoria / Makefile
Last active July 26, 2024 15:08
Makefile for C++ projects
# WARNING: `ASAN_OPTIONS=detect_leaks=1` is required to make leak sanitizer work
# WARNING: (M1/M2 Mac) using `leak` check can lead to showing memory leaks even for programs without any leaks
exec := build/prog
sources := $(wildcard src/*.cpp)
include_dir := include
cpp_version := c++17
checks := address,undefined # possible checks: address,undefined,leak,memory,thread,dataflow,cfi,kcfi,safe-stack
diagnostic_flags := -Wall -Wextra -Wpedantic -Wconversion -Wshadow
@wkktoria
wkktoria / KeyHolder.java
Created July 26, 2024 15:02
Simple Java program to hold selected key
import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyEvent;
public class KeyHolder {
private final static int KEY_TO_HOLD = KeyEvent.VK_BACK_SLASH; // Key can be configured here; backslash is the default key
private static boolean keepPressing = false;
public static void main(String[] args) throws AWTException {
final Robot robot = new Robot();