Skip to content

Instantly share code, notes, and snippets.

View Elijas's full-sized avatar

Elijas Dapšauskas Elijas

View GitHub Profile

TASK-: <Title> — progress

Status: <Not started | Planning, nothing implemented | Subtask N.M in progress | Done> (). <One or two sentences: what works, what is open, what is committed.>

Full initial request (verbatim)

<The user's request, copied as is. Add every later message that changed the task, each as its own quote, in order.>

Read first

@Elijas
Elijas / car-registration-assignment-solution.py
Last active July 14, 2026 07:22
Solution for Assignment "Car registration"
## Note: del b doesn't call __del__, because it's not guaranteed. Probably because there's a still reference to it in the _registered_cars dictionary
import re
from enum import Enum, auto
class REGISTRATION_STATUS(Enum):
SUCCESS = auto()
INVALID_NUMBER = auto()
ALREADY_REGISTERED = auto()
NUMBER_CHANGED = auto()
@Elijas
Elijas / easy_window_drag.ahk
Last active July 11, 2026 20:51
Easy Window Drag (KDE) - Allows to drag/resize windows by clicking and dragging mouse buttons while holding a modifier key. No more sniping the windows corners - just hovering the window becomes enough.
; Easy Window Dragging -- KDE style (requires XP/2k/NT) -- by Jonny
; http://www.autohotkey.com
; This script makes it much easier to move or resize a window: 1) Hold down
; the ALT key and LEFT-click anywhere inside a window to drag it to a new
; location; 2) Hold down ALT and RIGHT-click-drag anywhere inside a window
; to easily resize it; 3) Press ALT twice, but before releasing it the second
; time, left-click to minimize the window under the mouse cursor, right-click
; to maximize it, or middle-click to close it.
; This script was inspired by and built on many like it
@Elijas
Elijas / gist:7eee837563f2b916fcca35d81148e019
Created June 3, 2026 19:44
youtube-summarizer-for-learning.prompt.md
You are an expert at distilling YouTube video content into highly efficient learning materials. Your goal is to maximize knowledge transfer per unit of mental effort and time spent reading.
**Your Task:**
Analyze this transcript and create a summary that optimally balances:
- Information density (high signal-to-noise ratio)
- Cognitive load (easy to process and retain)
- Reading time (as brief as possible while preserving key learnings)
**Critical Instructions:**
1. **Decide the appropriate length yourself** - Could be 2 paragraphs or 10 paragraphs. Let the content's value and complexity guide you.
@Elijas
Elijas / g915-on-linux.md
Last active December 16, 2025 17:58
How to fix Logitech G915 going back to rainbow after sleep on Linux

How to fix the reset to rainbow lightning effect after keyboard wakes up from sleep

Install G HUB (Windows or MacOS), connect keyboard with Lightspeed, go to Settings, and set ON-BOARD MEMORY MODE to ON. This is a one-time setup for the lifetime of a keyboard.

Other features that work on Linux

Works out of the box:

  • All the media buttons, game mode (disables the Win key), volume control. In other words, all the buttons work.
  • Pressing ☀ cycles through brightness levels.
  • Pressing ☀ + [NUM] (where [NUM] is 0, 1, 2, ..., 9) allows you to change the lightning effect on the fly.
  • Pressing ☀ + - and ☀ + + changes the lightning effect speed for the non-custom effects.
@Elijas
Elijas / brainstorm-fundamental-building-blocks-for-ai-systems.txt
Last active May 19, 2025 16:02
brainstorm-fundamental-building-blocks-for-ai-systems.txt
LEGEND
<processing>
[data]
+ binary operator for structurally separable data
& binary operator for structurally inseparable data
(e.g. data and instructions in prompts are mixed up)
█ lines are the parts that are FUNCTION IMPLEMENTATION
| lines are the parts that are just scaffolding/definitions
@Elijas
Elijas / copy_file_content.sh
Last active April 17, 2025 16:30
copy_file_content.sh
#!/bin/bash
while IFS= read -r -d '' file; do
full_path=$(realpath "$file")
echo "=============================="
echo "START OF FILE: $full_path"
echo "=============================="
echo
cat "$full_path" 2>/dev/null
echo
echo "=============================="
@Elijas
Elijas / init_generator.sh
Created April 4, 2025 12:37
Script to add __init__.py files to directories with Python files
#!/bin/bash
# Script to add __init__.py files to directories with Python files
# Usage: ./add_init_py.sh [<folder_path> ...]
# Function to get absolute path, works on both Linux and macOS
get_abs_path() {
local path="$1"
if command -v readlink >/dev/null 2>&1 && readlink -f "$path" >/dev/null 2>&1; then
readlink -f "$path"
@Elijas
Elijas / set_git_aliases.sh
Last active July 18, 2023 08:23
Convenient git aliases
# no capitalization
git config --global alias.s '!git status'
git config --global alias.pp '!git pull --no-edit && git push'
git config --global alias.c '!sh -c "git commit -m \"$*\" && git pull --no-edit && git push" -'
git config --global alias.ac '!sh -c "git add -A && git commit -m \"$*\" && git pull --no-edit && git push" -'
git config --global alias.nac '!sh -c "nbdev_prepare && git add -A && git commit -m \"$*\" && git pull --no-edit && git push" -'
# with first letter capitalization
git config --global alias.s '!git status'
git config --global alias.pp '!git pull --no-edit && git push'
@Elijas
Elijas / install.sh
Created October 23, 2022 13:37
Install custom python version
pyenv install 3.6.15
virtualenv -p ~/.pyenv/versions/3.6.15/bin/python3.6 .venv
source ./.venv/bin/activate