Skip to content

Instantly share code, notes, and snippets.

View jauhararifin's full-sized avatar

Jauhar Arifin jauhararifin

View GitHub Profile
@jauhararifin
jauhararifin / map_test.go
Last active March 8, 2024 00:08
Benchmarks
package golangbench
import (
"fmt"
"hash/fnv"
"math/rand"
"runtime"
"sync"
"sync/atomic"
"testing"
package btree
import (
"fmt"
"slices"
"sort"
"strings"
)
type BTree struct {
@jauhararifin
jauhararifin / redis.go
Last active January 10, 2024 15:10
Simple redis implementation in Golang supporting only GET and SET operations
package main
import (
"bufio"
"errors"
"fmt"
"io"
"log/slog"
"net"
"os"
@jauhararifin
jauhararifin / redipy.py
Last active January 20, 2023 04:31
Super Simple Redis Clone In Python
import socket
import os
import logging
import dataclasses
import asyncio
from typing import Callable, Dict, List, Any, Union
@dataclasses.dataclass
class Error:
@jauhararifin
jauhararifin / mysql.sh
Last active March 21, 2019 14:58
Deploy mysql and phpmyadmin in docker locally
#!/bin/bash
sudo docker pull phpmyadmin/phpmyadmin
sudo docker pull mysql:5.7.24
sudo docker network create mysql-network
sudo docker run --name a-mysql \
--net=mysql-network \
-p 3306:3306 \