Skip to content

Instantly share code, notes, and snippets.

View enoch85's full-sized avatar

enoch85

  • Sweden
  • 10:29 (UTC +01:00)
View GitHub Profile
@enoch85
enoch85 / 00 - Cursor AI Prompting Rules.md
Created February 7, 2026 18:50 — forked from aashari/00 - Cursor AI Prompting Rules.md
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

The Autonomous Agent Prompting Framework

This repository contains a disciplined, evidence-first prompting framework designed to elevate an Agentic AI from a simple command executor to an Autonomous Principal Engineer.

The philosophy is simple: Autonomy through discipline. Trust through verification.

This framework is not just a collection of prompts; it is a complete operational system for managing AI agents. It enforces a rigorous workflow of reconnaissance, planning, safe execution, and self-improvement, ensuring every action the agent takes is deliberate, verifiable, and aligned with senior engineering best practices.

I also have Claude Code prompting for your reference: https://gist.github.com/aashari/1c38e8c7766b5ba81c3a0d4d124a2f58

@enoch85
enoch85 / test
Last active September 25, 2025 13:45
# Test script to debug folder detection logic and regex extraction
# This mimics the behavior in the main rclone script
$BackupConfig = @{
RCLONE_PATH = "C:\rclone.exe"
REMOTE_NAME = "nextcloud"
REMOTE_DIR = "SERVERS_DATA"
}
# Exclude Patterns - copy from main script to test extraction
# Windows User Data Backup Script using Rclone - Nextcloud/WebDAV Version
# Simplified version for Nextcloud with reasonable server load
# FIXED FOR POWERSHELL ISE 5 COMPATIBILITY
#
# DIRECTORY STRUCTURE:
# - SERVERS_DATA/COMPUTERNAME/C (entire C: drive contents)
# - SERVERS_DATA/COMPUTERNAME/D (entire D: drive contents)
# - SERVERS_DATA/COMPUTERNAME/E (etc.)
#
# SYNC MODES:
# SQL Server Database Backup Script - Auto-detects SQL Instance
# Works on any server without modification
# Auto-elevates permissions if needed (requires Domain Admin rights)
param(
[string]$BackupPath = "C:\SQLBackups",
[bool]$IncludeSystemDatabases = $false,
[bool]$UseCompression = $true,
[bool]$UseWindowsAuth = $true, # Set to false for SQL Auth
[string]$Username = "", # Only used if UseWindowsAuth = false
#!/bin/bash
# Run this script without any param for a dry run
# Run the script with root and with exec param for removing old kernels after checking
# the list printed in the dry run
uname -a
IN_USE=$(uname -a | awk '{ print $3 }')
echo "Your in use kernel is $IN_USE"
OLD_KERNELS=$(
@enoch85
enoch85 / Protonmail.md
Last active February 12, 2026 03:07 — forked from ibaiul/Protonmail.md
Configure the protonmail bridge linux client on Ubuntu 20.04 with Nextcloud

Protonmail on Ubuntu 20.04 server

#protonmail #ubuntu #linux

Before you start

Currently protonmail bridge for linux is distributed as part of an open beta program, but soon it will be made public (https://protonmail.com/bridge/install).

Consider that the bridge linux client requires a paid protonmail account to work.

Get the protonmail bridge linux installer

#!/bin/bash
# Root is needed
if [ "$EUID" -ne 0 ]
then
echo "This script must be run with root or sudo privileges! Please try again. :)"
exit
fi
# Check if Ubuntu
# USER: ubuntu
# PASS: Elefant09
# People should live in Sweden
d-i debian-installer/country string SE
# Computers should speak English
d-i debian-installer/language string en
d-i debian-installer/locale string en_US.UTF-8
d-i localechooser/preferred-locale string en_US.UTF-8
# nginx@nginx:~$ cat /etc/nginx/sites-available/outlook.conf
server {
listen 192.168.128.2:80;
server_name yourdomain.com;
return 301 https://yourdomain.com$request_uri;
}
server {
listen 192.168.128.2:443;
#!/bin/bash
# Tech and Me © - 2018, https://www.techandme.se/
# shellcheck disable=2034,2059
true
# shellcheck source=lib.sh
FIRST_IFACE=1 . <(curl -sL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh)
unset FIRST_IFACE