Skip to content

Instantly share code, notes, and snippets.

View jeroendk's full-sized avatar

Jeroen de Kok jeroendk

View GitHub Profile
@zemirco
zemirco / cache.go
Last active October 8, 2022 09:58
golang database layer with cache
type CacheInterface interface {
Get(key string) ([]byte, error)
Set(key string, value interface{}) error
}
// Cache implements CacheInterface.
type Cache struct {
// wrap redis pool connection
// or whatever you need
}
@probinso
probinso / auth-interceptor.service.ts
Created May 1, 2019 16:31
Cookie intercepting for authentication on NativeScript angular
import { Injectable } from "@angular/core";
import { Observable } from "rxjs";
import { tap } from "rxjs/operators";
import {
HttpInterceptor,
HttpHandler,
HttpRequest,
HttpEvent
} from "@angular/common/http";