Skip to content

Instantly share code, notes, and snippets.

View omeraydindev's full-sized avatar

Ömer Aydın omeraydindev

View GitHub Profile
@omeraydindev
omeraydindev / reject-em-dashes.ts
Last active June 14, 2026 18:21
OpenCode plugin that blocks em/en dashes at the tool level
import type { Plugin } from "@opencode-ai/plugin"
// Em dash (U+2014) and en dash (U+2013).
const DASH_RE = /[\u2014\u2013]/
const SYSTEM_RULE =
"Never use em dashes (—) or en dashes (–) in any file you write or edit. " +
"Use a hyphen (-), a comma, or reword the sentence instead. " +
"Writes/edits that introduce these characters will be rejected."
@omeraydindev
omeraydindev / langfuse_v3_filter_pipeline.py
Last active June 14, 2026 12:40
Fixed Langfuse v3 filter pipeline -- usage_details and trace creation fixes
"""
title: Langfuse Filter Pipeline for v3
author: open-webui
date: 2025-07-31
version: 0.0.1
license: MIT
description: A filter pipeline that uses Langfuse v3.
requirements: langfuse>=3.0.0
Fix applied 2026-06-14:
#!/usr/bin/env python3
"""
Fetch model definitions from models.dev and upsert them into a local
Langfuse instance via the public API.
Usage:
./sync-models-to-langfuse --provider anthropic,openai
./sync-models-to-langfuse --provider all
./sync-models-to-langfuse --provider all --dry-run
./sync-models-to-langfuse --provider all --tokenizer openai
// ==UserScript==
// @name Google Auto Change to English
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Automatically clicks the "Change to English" link on Google.com, waiting for uBO to hide the cookie banner first.
// @match *://*.google.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
// ==UserScript==
// @name Google Search Keyboard Navigator
// @namespace http://tampermonkey.net/
// @version 2.0
// @description Navigate Google search results, sitelinks, PAA, videos, and pages with keyboard
// @match https://www.google.com/search*
// @grant none
// ==/UserScript==
(function () {
// ==UserScript==
// @name YouTube Block "Experiencing interruptions?" Toast
// @namespace http://tampermonkey.net/
// @version 3.0
// @match https://www.youtube.com/*
// @run-at document-start
// @grant none
// ==/UserScript==
(function () {
#!/bin/bash
# Script to create a private fork of a public GitHub repository
# Usage: ./private_fork.sh <source_repo_url> <owner/new_repo_name>
# Owner can be your username or an org name
set -e
# Colors for output
RED='\033[0;31m'
@omeraydindev
omeraydindev / auto_unlike_insta_posts.js
Created December 27, 2025 18:35
a handy little chrome devtools script to batch unlike all likes in instagram. requires instagram to be in english (but can be modified for other languages)
await (async () => {
const $$ = document.querySelectorAll.bind(document);
const $$$ = (selector, text) => [...$$(selector)].find(e => e.innerText === text);
const sleep = async (ms) => new Promise(resolve => setTimeout(resolve, ms));
const rand = (min, max) => Math.floor(Math.random() * (max - min + 1) + min);
if (!window.location.pathname.includes('your_activity/interactions/likes')) throw 'pls go to https://www.instagram.com/your_activity/interactions/likes';
if (!$$$('span', 'Oldest to newest')) throw 'pls enable oldest to newest sort';
@omeraydindev
omeraydindev / FastAdapter.java
Last active May 29, 2022 16:55
Easy-to-use generic helper class to help reduce RecyclerView adapter boilerplate by wrapping an adapter internally. This can be useful for when you just need a basic, easy, fast adapter solution without the usual boilerplate that we've grown used to with RecyclerView adapters. Supports drag-drop reordering out of the box. See below for an example.
/*
* This is free and unencumbered software released into the public domain.
* For more information, please refer to <http://unlicense.org/>
*/
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
@omeraydindev
omeraydindev / dio_headerfixed_adapter.dart
Last active November 4, 2022 14:31
A HttpClientAdapter subclass copied exactly from dio's io_adapter.dart (dio 4.0.4) to fix the "bug" where Dio lowercases all header names before sending a request. Search ***changed*** to see the changed parts of the code.
import 'dart:async';
import 'dart:io';
import 'dart:typed_data';
import 'package:dio/dio.dart';
typedef OnHttpClientCreate = HttpClient? Function(HttpClient client);
/**
* Copied verbatim from dio's io_adapter.dart and