Skip to content

Instantly share code, notes, and snippets.

View traycho's full-sized avatar

Traycho Ivanov traycho

View GitHub Profile

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at [email protected] or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

@traycho
traycho / .java
Last active July 2, 2020 12:29
Validates if resource id is part of authentication scope attributes using micronaut-security and micronaut-security-attributes - https://github.com/traycho/micronaut-security-attributes
package com.pulsarix.micronaut.security.attributes.validation;
import com.pulsarix.micronaut.security.attributes.util.Attributes;
import io.micronaut.http.HttpRequest;
import io.micronaut.security.rules.SecurityRuleResult;
import javax.inject.Singleton;
import java.net.URI;
import java.util.List;
@traycho
traycho / creadentials.sh
Last active December 16, 2019 15:46
Get password from macOS keychain using a bash script.
#!/bin/bash
PASSWORD=$(keychainPassword)
echo $PASSWORD
# Fetch current user password from keychain
keychainPassword () {
return $(security 2>&1 >/dev/null find-generic-password -ga $USER | sed 's/password: "\(.*\)"/\1/')
}