Skip to content

Instantly share code, notes, and snippets.

View edihasaj's full-sized avatar
🐞
I write bugs that eventually turn into features

Edi Hasaj edihasaj

🐞
I write bugs that eventually turn into features
View GitHub Profile
model = "gpt-5.3-codex"
model_reasoning_effort = "high"
tool_output_token_limit = 25000
# Leave room for native compaction near the 272–273k context window.
# Formula: 273000 - (tool_output_token_limit + 15000)
# With tool_output_token_limit=25000 ⇒ 273000 - (25000 + 15000) = 233000
model_auto_compact_token_limit = 233000
[features]
@edihasaj
edihasaj / agent.md
Created February 13, 2026 16:36 — forked from steipete/agent.md
Agent rules for git
  • Delete unused or obsolete files when your changes make them irrelevant (refactors, feature removals, etc.), and revert files only when the change is yours or explicitly requested. If a git operation leaves you unsure about other agents' in-flight work, stop and coordinate instead of deleting.
  • Before attempting to delete a file to resolve a local type/lint failure, stop and ask the user. Other agents are often editing adjacent files; deleting their work to silence an error is never acceptable without explicit approval.
  • NEVER edit .env or any environment variable files—only the user may change them.
  • Coordinate with other agents before removing their in-progress edits—don't revert or delete work you didn't author unless everyone agrees.
  • Moving/renaming and restoring files is allowed.
  • ABSOLUTELY NEVER run destructive git operations (e.g., git reset --hard, rm, git checkout/git restore to an older commit) unless the user gives an explicit, written instruction in this conversation. Treat t
#!/usr/bin/env bun
"use strict";
const fs = require("fs");
const { execSync } = require("child_process");
const path = require("path");
// ANSI color constants
const c = {
cy: '\033[36m', // cyan
@edihasaj
edihasaj / .htaccess
Created March 15, 2023 17:10 — forked from alexsasharegan/.htaccess
Apache Config for React Router
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
@edihasaj
edihasaj / origin.ps1
Created January 28, 2023 10:46
Pull/Push different origin
# Set the new remote repository URL
$oldUrl = "https://github.com/your-git.git"
$newUrl = "https://target-git.git"
# Get the current directory
$currentDir = "C:\Users\where"
# Change directory to the .git folder
cd "$currentDir\.git"
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
@edihasaj
edihasaj / ohmyposhv3-v2.json
Created January 22, 2023 14:44 — forked from shanselman/ohmyposhv3-v2.json
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@edihasaj
edihasaj / main.py
Last active December 19, 2022 10:39
Download or list s3 bucket custom url or custom hosting
import boto3
if __name__ == '__main__':
s3 = boto3.client(
's3',
aws_access_key_id='your key',
aws_secret_access_key='your password',
endpoint_url="https://s3.yourcustomdomain.com",
)
@edihasaj
edihasaj / React refresh 404 fix for PHP server
Created March 1, 2022 14:19
React refresh 404 fix for PHP server
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
</IfModule>
@edihasaj
edihasaj / CompositeValidationResult.cs
Created January 9, 2022 19:30
C# Validate object recursively. Manual validation of property object.
public class CompositeValidationResult : ValidationResult
{
private readonly List<ValidationResult> _results = new();
public CompositeValidationResult(string errorMessage) : base(errorMessage)
{
}
public CompositeValidationResult(string errorMessage, IEnumerable<string> memberNames) : base(errorMessage,
memberNames)