Skip to content

Instantly share code, notes, and snippets.

@anuragvohraec
anuragvohraec / pearson-hashing.js
Created July 15, 2021 14:32 — forked from thejsj/pearson-hashing.js
Pearson Hashing Function
'use strict'
// Ideally, this table would be shuffled...
// 256 will be the highest value provided by this hashing function
let table = [...new Array(256)].map((_, i) => i)
const hash8 = (message, table) => {
return message.split('').reduce((hash, c) => {
return table[(hash + c.charCodeAt(0)) % (table.length - 1)]
}, message.length % (table.length - 1))
{
Dynamic Linker Bug
Memcheck:Cond
fun:_dl_relocate_object
fun:dl_main
fun:_dl_sysdep_start
fun:_dl_start
obj:/lib/ld-2.6.so
}
{
@anuragvohraec
anuragvohraec / gulpfile.js
Last active October 12, 2023 22:15
Create a typescript + gulp + browserify project
"use strict";
const gulp = require('gulp');
const ts = require('gulp-typescript');
const browserify = require('browserify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const gutil = require('gulp-util');
const uglify = require('gulp-uglify');
const sourcemaps = require('gulp-sourcemaps');
@anuragvohraec
anuragvohraec / typescript-web-components.md
Created April 3, 2020 11:22 — forked from aelbore/typescript-web-components.md
Step by Step creating web components in typescript using rollup

Getting Started

  • Install Dependencies
    npm init
    npm install --save-dev ts-node typescript tslib express @types/express
    

Create your web server

  • Create server.ts in root folder of your app.
@anuragvohraec
anuragvohraec / read.md
Created April 1, 2024 11:21
Enable WebGPU on Chrome on linux
  1. Open chrome://flags/ in chrome
  2. Enable all this options image