Skip to content

Instantly share code, notes, and snippets.

View aluxian's full-sized avatar

Alexandru Rosianu aluxian

View GitHub Profile
@steipete
steipete / agent.md
Created October 14, 2025 14:41
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

Full prompt:
You are ChatGPT, a large language model trained by OpenAI. Knowledge cutoff: 2024-06 Current date: XX

Image input capabilities: Enabled

You are ChatGPT's agent mode. You have access to the internet via the browser and computer tools and aim to help with the user's internet tasks. The browser may already have the user's content loaded, and the user may have already logged into their services.

Financial activities

You may complete everyday purchases (including those that involve the user's credentials or payment information). However, for legal reasons you are not able to execute banking transfers or bank account management (including opening accounts), or execute transactions involving financial instruments (e.g. stocks). Providing information is allowed. You are also not able to purchase alcohol, tobacco, controlled substances, or weapons, or engage in gambling. Prescription medication is allowed.

@hanxiao
hanxiao / testRegex.js
Last active September 4, 2025 18:54
Regex for chunking by using all semantic cues
// Updated: Aug. 20, 2024
// Run: node testRegex.js whatever.txt
// Live demo: https://jina.ai/tokenizer
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// COPYRIGHT: Jina AI
const fs = require('fs');
const util = require('util');
// Define variables for magic numbers
const MAX_HEADING_LENGTH = 7;
@adtac
adtac / Dockerfile
Last active July 13, 2025 20:06
#!/usr/bin/env docker run
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')"
# syntax = docker/dockerfile:1.4.0
FROM node:20
WORKDIR /root
RUN npm install sqlite3
@greird
greird / slack-files-downloader.sh
Last active August 1, 2025 16:44
Download all files from a Slack workspace export folder.
#!/bin/bash
#
# This script will browse a Slack export folder and download all files in a new /export folder
#
# HOW TO:
# 1. As a Workspace admin, download an export of your Slack history (https://www.slack.com/services/export)
# 2. Make sure you have jq installed (https://stedolan.github.io/jq/)
# 3. Place this file at the root of your Slack export folder, next to channels.json
# 4. Run `bash slack-files-downloader.sh` in your terminal
#
// ==UserScript==
// @name Disable YouTube playlists
// @description Remove playlist part from watched videos
// @namespace https://gist.github.com/Maxr1998/f07175ad05ed5c783da9b98bceee61a6
// @downloadURL https://gist.github.com/Maxr1998/f07175ad05ed5c783da9b98bceee61a6/raw/2b47f9d7949f95b1b6e50f3be79d49ac48f95af7/disable_youtube_playlists.user.js
// @updateURL https://gist.github.com/Maxr1998/f07175ad05ed5c783da9b98bceee61a6/raw/2b47f9d7949f95b1b6e50f3be79d49ac48f95af7/disable_youtube_playlists.user.js
// @author Maxr1998
// @version 0.1.1
// @match *://*.youtube.com/*
// @icon https://www.google.com/s2/favicons?domain=youtube.com
@patro85
patro85 / JWT Decode.sh
Last active June 19, 2022 15:46
A BBEdit Text Filter script to take textual input and produce decode of JWT tokens.
#!/bin/bash
#
# JWT Decode
# https://gist.github.com/patro85/2a76d16181730989b9b9af6a7ca6cd1e
#
# A BBEdit Text Filter script to take textual input and produce decode of JWT tokens.
# Note: Signature section is ignored. Meant to be used in conjunction with a separate JSON
# formatter.
#
# Installation instructions: Place this file in BBEdit's "Text Filters" folder inside of
@Wallacy
Wallacy / apollo.ts
Last active January 29, 2023 16:33
Apollo Server + Cloudflare Workers
import { ApolloServerBase, Config, gql } from 'apollo-server-core'
export class ApolloServer extends ApolloServerBase {
protected override serverlessFramework(): boolean {
return true
}
public async createHandler() {
await this.ensureStarted()
return async (request: Request) => {
@evanreichard
evanreichard / pwa-everything.user.js
Created January 1, 2022 21:28
pwa-everything.user.js
// ==UserScript==
// @name PWA Everything
// @author Evan Reichard
// @version 0.0.1
// @match *://*/*
// @grant none
// @run-at document-idle
// @noframes
// ==/UserScript==
@StarLard
StarLard / DetentSheet.swift
Last active March 11, 2025 04:44
A simple implementation of an UISheetPresentationController wrapper using SwiftUI
//
// DetentSheet.swift
// StarLardKit
//
// Created by Caleb Friden on 9/28/21.
//
import SwiftUI
// MARK: - Public