Skip to content

Instantly share code, notes, and snippets.

View AJV009's full-sized avatar
🛠️
Learning and Building for Tomorrow ☺️

Alphons Jaimon AJV009

🛠️
Learning and Building for Tomorrow ☺️
View GitHub Profile
@AJV009
AJV009 / auto-external-player.plugin.js
Created June 13, 2026 17:06
Stremio Enhanced plugin: auto-launch external player (mpv/vlc) on play — fixes the broken built-in interceptor on v1.1.5 (window.services.core removed upstream). Reads the stream URL from <video>.src or the network layer.
/**
* @name Auto External Player (slow-stream fix)
* @description Auto-launches the configured external player (mpv/vlc) on playback. Reads the resolved stream URL from the <video> element (direct play) or, when Stremio uses an MSE blob, from the network layer (the real URL appears in Stremio's own requests). Works around the broken built-in interceptor whose window.services.core path no longer exists in current Stremio Web.
* @version 3.0.0
* @author AJV009
*/
(function () {
'use strict';
const LOG = '[AutoExtPlayer]';
@AJV009
AJV009 / pii-checksum-validation-test.php
Created March 21, 2026 21:25
Drupal AI module: PII checksum validation test - Luhn (credit cards) + MOD-97 (IBANs) vs regex-only detection. Shows false positive elimination rates.
<?php
declare(strict_types=1);
/**
* @file
* PII Checksum Validation Test Script.
*
* Demonstrates how adding Luhn (ISO/IEC 7812-1) and MOD-97 (ISO 7064)
* checksum validation to regex-based PII guardrails eliminates false
## Core Identity & Environment
- Primary programming language: Python (experienced developer, not a beginner)
- Operating System: EndeavourOS Mercury Neo (Arch Linux, KDE Plasma 6, Wayland, Linux 6.xx.x)
- When suggesting commands for MY system, reference Arch Linux specifically
## Scenario 1: System Troubleshooting & Configuration
**When I'm debugging issues on MY Linux system or configuring MY tools:**
- Always ask for current tool configurations first, as I have many custom implementations
- Provide efficient diagnostic commands based on EndeavourOS/Arch Linux, KDE Plasma 6, Wayland
- Include simple one-liners to quickly identify available tools (e.g., "which tool1 tool2 tool3")
## Technical Environment
- Primary programming language: Python (experienced developer, not a beginner)
- Operating System: EndeavourOS Mercury Neo (Arch Linux, KDE Plasma 6, Wayland, Linux 6.xx.x)
- When suggesting commands, reference Arch Linux specifically and consult Arch Linux documentation when needed
- Always ask for current tool configurations when debugging tools, as I have many custom implementations. Get an idea of tool configs before making suggestions or solutions.
## Communication Style
- Keep explanations brief and to the point
- Ask clarifying questions before giving detailed answers, especially when additional context would enrich the response
- When asking clarifying questions about system-related topics, provide efficient diagnostic commands based on my known environment (EndeavourOS/Arch Linux, KDE Plasma 6, Wayland)
#!/bin/bash
# Check if source directory is provided
if [ "$#" -lt 1 ]; then
echo "Usage: $0 source_directory [output_directory]"
echo "Example: $0 /path/to/source"
echo "If output_directory is not specified, will create '{source_directory}_flattened'"
exit 1
fi
@AJV009
AJV009 / workspace_setup.sh
Created June 29, 2024 20:45
A small script I used to setup my workspace...
#!/bin/bash
# Function to get primary monitor dimensions
get_primary_monitor_dimensions() {
xrandr --query | awk '/ primary /{print $4}' | cut -d'+' -f1
}
# Function to get primary monitor position
get_primary_monitor_position() {
xrandr --query | awk '/ primary /{print $4}' | cut -d'+' -f2,3
[
{
"task": "renewable_energy_presentation",
"prompt": "Create a presentation about the benefits of renewable energy. Include a pie chart showing the global energy mix and a bar plot comparing the costs of different energy sources. Use a green technology theme and make it look professional."
},
{
"task": "ai_healthcare_research_summary",
"prompt": "Make a presentation summarizing the key findings of the research paper 'Advances in AI for Healthcare' by John Doe et al. Include the most important figures and tables from the paper. Use a clean, minimalistic theme suitable for an academic audience."
},
{
{
"Create new presentation": "Ctrl+N",
"Add a new slide": "Ctrl+M",
"Apply bold formatting to the selected text": "Ctrl+B",
"Open the Font dialog box": "Ctrl+T",
"Cut selected text, object, or slide": "Ctrl+X",
"Copy selected text, object, or slide": "Ctrl+C",
"Paste cut or copied text, object, or slide": "Ctrl+V",
"Insert a hyperlink": "Ctrl+K",
"Insert a new comment": "Ctrl+Alt+M",
@AJV009
AJV009 / pdfToImg.py
Created July 20, 2023 08:18
PDF to Images
import os
from PyPDF2 import PdfReader
from pdf2image import convert_from_path
# directory where your PDFs are stored
pdf_dir = 'pdfFiles'
# iterate over each file in the directory
for file in os.listdir(pdf_dir):
if file.endswith('.pdf'):
@AJV009
AJV009 / downloadPDFjsFIle.js
Last active July 20, 2023 08:17
Download PDF.js PDF files from any site
function downloadPDFs() {
// Query all iframe elements
var iframes = document.querySelectorAll("iframe");
// Function to extract PDF URL
function getPDFUrl(src) {
// Check if it's a PDF.js URL
if (src.includes('pdfjs')) {
// Extract file parameter
var fileParam = new URL(src).searchParams.get('file');