Skip to content

Instantly share code, notes, and snippets.

@rnikoopour
rnikoopour / App.java
Last active July 22, 2020 18:17
Authenticating to Vault using IAM and vault-java-driver
package com.mycompany.app;
import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
import software.amazon.awssdk.auth.credentials.AwsCredentials;
import software.amazon.awssdk.auth.signer.Aws4Signer;
import software.amazon.awssdk.auth.signer.params.Aws4SignerParams;
import software.amazon.awssdk.http.SdkHttpFullRequest;
import software.amazon.awssdk.http.SdkHttpMethod;
import software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain;
import software.amazon.awssdk.regions.Region;
FROM alpine:3.11
RUN apk update \
&& apk upgrade \
&& apk add git npm
# Go
RUN apk add go \
&& go get golang.org/x/tools/gopls
ENV PATH="${PATH}:/root/go/bin"
@rnikoopour
rnikoopour / functionComposition.cpp
Last active April 12, 2017 01:24
I wanted to play around with function composition in C++. So I overloaded the `|` operator to turn it into a composition operator!
#include <iostream>
template <class Func> struct WrappedFunc {
Func function;
};
template <class T>
struct wrapped {
T val;
};
@rnikoopour
rnikoopour / rpi_b.h
Last active August 29, 2015 14:14
Custom u-boot settings for RPI
/*
* (C) Copyright 2012 Stephen Warren
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
*