Skip to content

Instantly share code, notes, and snippets.

View jurabek's full-sized avatar
🏠
Working from home

Jurabek jurabek

🏠
Working from home
View GitHub Profile
@jurabek
jurabek / handler.go
Created January 21, 2024 21:20 — forked from ehernandez-xk/handler.go
http.HandlerFunc wrapper technique
//https://medium.com/@matryer/the-http-handler-wrapper-technique-in-golang-updated-bc7fbcffa702
//wraps the handler do do things before and/or after
func auth(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Println("Before")
h.ServeHTTP(w, r)
fmt.Println("After")
})
}
@jurabek
jurabek / create-all.sh
Created September 14, 2020 17:27 — forked from mark-kubacki/create-all.sh
a dummy Certificate Authority for development and testing
#!/bin/bash
#
# Copyright (c) 2015 W. Mark Kubacki <wmark@hurrikane.de>
# Licensed under the terms of the RPL 1.5 for all usages
# http://www.opensource.org/licenses/rpl1.5
#
set -e -o pipefail
CAsubj="/C=DE/ST=Niedersachsen/L=Hannover/O=Dummy CA/CN=Sign-It-All"
@jurabek
jurabek / tmux-cheatsheet.markdown
Created August 9, 2020 10:50 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
using Fusillade;
using ReactiveUI;
using Refit;
using Restaurant.Model;
using Restaurant.Models;
using Restaurant.ReactiveUI;
using Splat;
using System;
using System.Diagnostics;
using System.Net.Http;
using Fusillade;
using ReactiveUI;
using Refit;
using Restaurant.Model;
using Restaurant.Models;
using Restaurant.ReactiveUI;
using Splat;
using System;
using System.Diagnostics;
using System.Net.Http;