Skip to content

Instantly share code, notes, and snippets.

View Zejnilovic's full-sized avatar

Saša Zejnilović Zejnilovic

View GitHub Profile
@Zejnilovic
Zejnilovic / activate_env.sh
Created November 12, 2023 09:15
Function to easily select venv if you have more then one.
function activate_env() {
# Get
local filtered_envs=($(find . -maxdepth 1 -type d -exec test -e '{}/bin/activate' \; -print))
# If no environments found
if [[ ${#filtered_envs[@]} -eq 0 ]]; then
echo "No suitable environments found."
return
fi
@Zejnilovic
Zejnilovic / github_ref.lua
Created January 5, 2026 10:34
A small Neovim helper that opens GitHub references under the cursor (or visual selection) in a browser. This is editor-native. No plugins, no API calls, no Tree-sitter, no LSP. Just Lua.
--[[
github_ref.lua
A small, editor-native Neovim helper for opening GitHub references found
under the cursor or in a visual selection.
This file intentionally avoids plugins, GitHub API calls, Tree-sitter,
LSP integration, or background jobs. It is designed to be fast, predictable,
and usable anywhere text appears (code, documentation, comments, or notes).
@Zejnilovic
Zejnilovic / pdf_splitter_generic.py
Created January 19, 2026 12:35
Generic PDF text splitter - organizes extracted PDFs into section files using configurable regex patterns
#!/usr/bin/env python3
"""
Generic PDF Text Splitter
Splits extracted PDF text into multiple files based on chapter/section patterns.
Usage:
python3 pdf_splitter.py --input input.txt --output ./sections --pattern "^(\d+)\.\s+(.+)$"
python3 pdf_splitter.py --input input.txt --output ./sections --pattern "^Chapter\s+(\d+):\s+(.+)$"
python3 pdf_splitter.py --input input.txt --output ./sections --pattern "^#+\s+(.+)$" # Markdown headers
"""
@Zejnilovic
Zejnilovic / EMOJIS.md
Last active January 21, 2026 00:03
GitHub emoji list (auto-generated)

GitHub Emojis

This document is automatically generated from the GitHub Emoji API. Emoji categories are derived from the official Unicode emoji definitions. Emojis not defined by Unicode are listed under GitHub-Only.

GitHub-Only

Code Emoji Code Emoji