Skip to content

Instantly share code, notes, and snippets.

//! Leveshtein distance
//! Leveshtein distance considers the 3 possibilities strings can differ -
//! addition, subtraction and deletion at each state of iteration and tries all
//! the cases to find the minimum distance.
use std::{collections::HashMap, convert::TryInto};
pub fn levenshtein(a: &str, b: &str) -> i32 {
cached(a, b, &mut HashMap::new())
jaseemabid / log.txt
Created October 13, 2018 22:53
Stack + llvm-hs-pretty
Version 1.7.1 x86_64
Compiled with:
- Cabal-
- Glob-0.9.2
- HUnit-
- QuickCheck-2.11.3
- StateVar-
- aeson-
- aeson-compat-
- annotated-wl-pprint-0.7.0
jaseemabid /
Last active October 9, 2018 03:06


A safe storage for your personal data like photos, documents and notes for life. Privacy and safety over anything else.

What would it be?

  1. A dead simple folder you can drag and drop files into and forget about. As simple as dropbox but something you can trust.
jaseemabid / .gitignore
Last active March 22, 2018 08:53
Basic jenkins monitoring
jaseemabid / spectre.c
Created January 4, 2018 04:42 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#include <x86intrin.h> /* for rdtscp and clflush */
jaseemabid / 30-randomize-mac-address.conf
Created December 3, 2017 18:06 — forked from fawkesley/30-randomize-mac-address.conf
MAC address randomization in Ubuntu 17+ (>= 1.4.1): save to /etc/NetworkManager/conf.d/
# /etc/NetworkManager/conf.d/30-randomize-mac-address.conf
# REQUIRES NETWORK MANAGER >= 1.4.1 (Ubuntu Zesty and above)
# Thanks to
# This randomize your MAC address for *new* connections
# Be sure to change your existing (saved) connections in
# /etc/NetworkManager/system-connections/*
jaseemabid / .gitignore
Last active August 25, 2017 09:51
jaseemabid / adler.hs
Created February 26, 2017 10:04
Adler32 implementation in C and Haskell
adler32 :: String -> Int
adler32 = helper 1 0
helper a b (x:xs) = helper a' b' xs
where a' = (a + (ord x .&. 0xff)) `mod` base
b' = (a' + b) `mod` base
base = 65521
helper a b _ = (b `shiftL` 16) .|. a

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

jaseemabid / .gitignore
Last active October 23, 2016 19:56
Battleship domain model