Skip to content

Instantly share code, notes, and snippets.

View dimtass's full-sized avatar

Dimitris Tassopoulos dimtass

View GitHub Profile
@dimtass
dimtass / main.go
Created February 17, 2022 08:06
Chain middleware and httpHandlerFunc in go with gorilla/mux
package main
import (
"fmt"
"net/http"
"github.com/gorilla/mux"
)
type httpHandlerFunc func(http.ResponseWriter, *http.Request)
@dimtass
dimtass / Makefile
Last active August 19, 2020 08:38
Using netlink with docker
obj-m := knetlink.o
SRC := $(shell pwd)
all:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
/* usbreset -- send a USB port reset to a USB device
*
* Compile using: gcc -o usbreset usbreset.c
*
*
* */