Skip to content

Instantly share code, notes, and snippets.

View DannyHinshaw's full-sized avatar
😎
Pro

Danny Hinshaw DannyHinshaw

😎
Pro
View GitHub Profile
@maratori
maratori / .golangci.yml
Last active April 24, 2024 16:59
Golden config for golangci-lint
# This code is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021 Marat Reymers
## Golden config for golangci-lint v1.57.2
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt and change it for your needs.
run:
@corbanb
corbanb / pre-request-jwt.js
Last active February 21, 2024 14:47
JWT tokenize - Postman Pre-Request Script
function base64url(source) {
// Encode in classical base64
encodedSource = CryptoJS.enc.Base64.stringify(source);
// Remove padding equal characters
encodedSource = encodedSource.replace(/=+$/, '');
// Replace characters according to base64url specifications
encodedSource = encodedSource.replace(/\+/g, '-');
encodedSource = encodedSource.replace(/\//g, '_');
@mihow
mihow / load_dotenv.sh
Last active April 25, 2024 14:18
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi