Skip to content

Instantly share code, notes, and snippets.

@mliezun
mliezun / main.go
Created April 9, 2023 00:19
notredis
package main
import (
"bufio"
"errors"
"fmt"
"log"
"net"
"strconv"
"strings"
@mliezun
mliezun / quine.gr
Created November 26, 2022 18:26
Grotsky Quine
let tabChar = 9
let quoteChar = 34
let commaChar = 44
let code = [
"let tabChar = 9",
"let quoteChar = 34",
"let commaChar = 44",
"let code = [",
"]",
"for let i = 0; i < 4; i = i+1 {",
@mliezun
mliezun / download-mysql-server-debug.sh
Last active August 1, 2022 22:26
Installing mysql on debug mode
#!/bin/bash
set -euxo pipefail
## Download and build mysql server
git clone https://github.com/mysql/mysql-server.git
cd mysql-server
git apply ../mysql-server.patch
cd ..
@mliezun
mliezun / keybase.md
Created June 10, 2022 00:38
keybase.md

Keybase proof

I hereby claim:

  • I am mliezun on github.
  • I am mliezun (https://keybase.io/mliezun) on keybase.
  • I have a public key ASAes91LVjZzTtNl6GnqG9s-bW7dagdaHYq25wzaeYis_go

To claim this, I am signing this object:

@mliezun
mliezun / proxies.js
Created December 31, 2021 20:55
Playing with Javascript Proxies (getters/setters)
const validate = (prop, value) => {
// Make sure that the property and value are serializable
// JSON.stringify throws an error if not serializable
const l = {}
l[prop] = value
JSON.stringify(l)
return l
}
const nestedExists = (obj, ks) => {