Skip to content

Instantly share code, notes, and snippets.

View shaal's full-sized avatar

Ofer Shaal shaal

View GitHub Profile
@ruvnet
ruvnet / ruvector-rabitq-2026-overview.md
Last active April 24, 2026 17:30
ruvector-rabitq: 1-bit rotation-based vector quantization in Rust — symmetric (Charikar) + asymmetric (RaBitQ-2024) estimators, SoA + cos-LUT optimized kernel: 32x codes / 21x full-index compression, 3.13x speedup at 100% recall@10 on n=100k clustered D=128 vectors

ruvector-rabitq — Rotation-Based 1-Bit Vector Quantization in Rust

Two 1-bit ANN distance estimators (symmetric Charikar-LSH + asymmetric RaBitQ-2024), 32× per-vector code compression, 21× full-index memory compression, 3.13× end-to-end speedup at 100% recall@10 on n = 100,000 clustered D=128 vectors — pure Rust, no C/C++ deps, no SIMD intrinsics yet.

Part of the ruvector vector search library. Branch: research/nightly/2026-04-23-rabitq (head 6c6e04554) · ADR-154 · PR #370


What's in this crate

@ruvnet
ruvnet / Contrastive-ai.md
Last active March 24, 2026 17:07
# The Contrastive AI Manifesto

The Contrastive AI Manifesto

A Foundation for Coherent Intelligence


I. The Premise

The future of AI is not scale.

@tomsiwik
tomsiwik / README.md
Last active May 6, 2025 23:44
How to proxy Cursor → OpenAPI → Python → Ollama

Make sure you run ollama serve (this is OpenAI-compatible http://localhost:11434)

Open cursor model settings and specify:

  • Specify http://localhost:8000/v1
  • Hit "Save" (no need to activate key)
  • Select gpt-4o and enjoy local model
uv venv
@KonnorRogers
KonnorRogers / my-element.ts
Last active July 16, 2024 16:17
Catching hydration errors in Lit
class MyElement extends LitElement {
protected update(changedProperties: PropertyValues<this>): void {
try {
super.update(changedProperties)
} catch (e) {
// We should probably check the contents of the message since this could error on a regular update??
// I really dont know. Its hacky, but it works.
const event = new Event("lit-hydration-error", { bubbles: true, composed: true, cancelable: false })
// @ts-expect-error leave me alone TS.
event.error = e
@shaal
shaal / cursor.sh
Created July 11, 2024 14:34 — forked from ddwang/cursor.sh
Replace `/mnt/c/Users/<USER_NAME>/AppData/Local/Programs/cursor/resources/app/bin/cursor`
#!/usr/bin/env sh
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
if [ "$VSCODE_WSL_DEBUG_INFO" = true ]; then
set -x
fi
COMMIT="abd2f3db4bdb28f9e95536dfa84d8479f1eb312d"
APP_NAME="code"
@ddwang
ddwang / cursor.sh
Last active December 9, 2024 00:24
Replace `/mnt/c/Users/<USER_NAME>/AppData/Local/Programs/cursor/resources/app/bin/cursor`
#!/usr/bin/env sh
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
if [ "$VSCODE_WSL_DEBUG_INFO" = true ]; then
set -x
fi
COMMIT="abd2f3db4bdb28f9e95536dfa84d8479f1eb312d"
APP_NAME="code"
#!/bin/bash -e
# Generates a detached tmate session, perfect to debug pipelines in-line
tmate -S /tmp/tmate.sock new-session -d
tmate -S /tmp/tmate.sock wait tmate-ready
tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}'
tmate -S /tmp/tmate.sock wait-for new-session
@bbenjamin
bbenjamin / drupalJqueryRemoval.md
Last active February 7, 2023 13:21
Issues relevant to Drupal JavaScript modernization and jQuery removal

Presentation Slides

https://docs.google.com/presentation/d/17Zpy5fZQsWsoZBhisA3rQiZy_JrK9MPR_HdgAisQ9XI/edit?usp=sharing

jQuery UI

@tsega
tsega / d9_porting_weekend_setup.md
Last active November 19, 2024 15:40
How to contribute to Drupal 9 Porting Weekend

How to prepare for Drupal 9 Porting Weekend

If you haven't heard about it, there is an important event scheduled for May 22 & 23, 2020 to do mass porting of Drupal 8 modules and themes to Drupal 9.

The following a set of instructions will show you how to contribute to that effort.

For a more detailed detailed account please see Kristen Pol's blog post, Preparing yourself for Drupal 9 porting weekend.

1. Install Drupal 8 + Helper Modules

  1. First thing to do, of course, is to install Drupal 8 - the recommended way is to use composer. For alternative setups, see @mradcliffe comment below.
@nikathone
nikathone / RecurringOrderManager.php
Last active November 21, 2019 22:15
Customization for revoking a subscription/Commerce recurring
<?php
namespace Drupal\custom_commerce_recurring;
use Drupal\commerce_order\Entity\OrderInterface;
use Drupal\commerce_recurring\RecurringOrderManager as BaseRecurringOrderManager;
use Drupal\commerce_recurring\RecurringOrderManagerInterface;
use Drupal\Component\Datetime\TimeInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;