sh install-docker.sh- log out
- log back in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reverse-Engineering Cursor's fast Code Search algorithm | |
| *Ahmed Yousri · March 2026* | |
| --- | |
| In March 2026, Cursor published a blog post titled ["Fast regex search"](https://cursor.com/blog/fast-regex-search) by Vicent Marti. It described how they'd built an indexed code search system that could find a pattern across an entire codebase in 13 milliseconds. Their claim: sparse n-gram inverted indexes, two files on disk, a single binary search on a memory-mapped lookup table. | |
| I read it and thought: I can build that. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package io.mapledoum.telegram.starter.exams.tools; | |
| import javax.crypto.Cipher; | |
| import javax.crypto.spec.IvParameterSpec; | |
| import javax.crypto.spec.SecretKeySpec; | |
| import java.io.IOException; | |
| import java.net.URL; | |
| import java.security.MessageDigest; | |
| import java.security.NoSuchAlgorithmException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ```Java | |
| public class test { | |
| public static void main(String[] args) throws Exception { | |
| test t = new test(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ```javascript | |
| var mongoose = require('mongoose'); | |
| //Set up default mongoose connection | |
| async function calcSumByWeek() { | |
| const weeklypipeline = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var R = require("ramda"); | |
| var memoizeUntil = function (fn, expiry) { | |
| var cache = {}; | |
| var onExpiry = []; | |
| var onCache = []; | |
| var onCachedResult = []; | |
| var memoized = function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script requires jq, a command line to to parse and format JSon. | |
| # https://stedolan.github.io/jq/ | |
| function padBase64 { | |
| STR=$1 | |
| MOD=$((${#STR}%4)) | |
| if [ $MOD -eq 1 ]; then | |
| STR="${STR}=" |
Run
$ docker-compose up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class My_Custom_My_Account_Endpoint { | |
| /** | |
| * Custom endpoint name. | |
| * | |
| * @var string | |
| */ | |
| public static $endpoint = 'my-custom-endpoint'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Attributes shortcode callback. | |
| */ | |
| function so_39394127_attributes_shortcode( $atts ) { | |
| global $product; | |
| if( ! is_object( $product ) || ! $product->has_attributes() ){ |
NewerOlder