Skip to content

Instantly share code, notes, and snippets.

View krrrr38's full-sized avatar
💭
🍣

Ken Kaizu krrrr38

💭
🍣
View GitHub Profile
@enricofoltran
enricofoltran / main.go
Last active April 1, 2024 00:17
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@danielrw7
danielrw7 / replify
Last active October 24, 2023 12:03
replify - Create a REPL for any command
#!/bin/sh
command="${*}"
printf "Initialized REPL for `%s`\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
do
eval "$command $input"
printf "%s> " "$command"
@eed3si9n
eed3si9n / Macros.scala
Last active December 13, 2015 23:29 — forked from xuwei-k/Macros.scala
import scala.reflect.macros.Context
import scala.util.matching.Regex
import java.util.regex.PatternSyntaxException
object Macros {
implicit class RegexContext(val c: String) {
def regex(): Regex = macro regexImpl
}
def regexImpl(c: Context)(): c.Expr[Regex] = {