Skip to content

Instantly share code, notes, and snippets.

@hdf
hdf / crc32_quine.cpp
Last active November 2, 2022 11:33 — forked from praetoriansentry/main.go
Program to find crc32 collision, generates output like: `Hello, my hash is: 1A745BD7! :)`
// To compile:
// nvcc -O3 -Xcompiler -openmp crc32_quine.cpp -o crc32_quine
// Inspired by: https://gist.github.com/praetoriansentry/03b6dc2e68e174ffd8168aef7d85f910
// (Can be timed with: http://www.pc-tools.net/win32/ptime/)
// (Was not able to make it faster than the insiration, golang is impressive.)
#include <stdio.h> // printf, sprintf
#include "Crc32.cpp" // From: https://github.com/stbrumme/crc32
@hdf
hdf / index.html
Last active February 5, 2021 23:17 — forked from hynekcer/maxsubstring.py
fast longest common substring - by suffix array
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Redundancy checker</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--<script src="lrs.min.js"></script>-->
<style>
html {
font-family: 'Verdana', sans-serif;