Skip to content

Instantly share code, notes, and snippets.

@jappievw
jappievw / boto3_session_management_and_assume_role.py
Last active July 22, 2023 18:43
Boto3 Management Session with Refreshable Assume Role
from os import getenv
from boto3 import Session
from util import make_refreshable_assume_role_session
def example():
management_session = Session(aws_access_key_id=getenv('AWS_ACCESS_KEY_ID'),
aws_secret_access_key=getenv('AWS_SECRET_ACCESS_KEY'))
assume_role_params = dict(
@jlmelville
jlmelville / build.gradle
Created October 27, 2015 17:17
Workaround for gradle application plugin 'the input line is too long' error on Windows
tasks.withType(CreateStartScripts).each { task ->
task.doLast {
String text = task.windowsScript.text
text = text.replaceFirst(/(set CLASSPATH=%APP_HOME%\\lib\\).*/, { "${it[1]}*" })
task.windowsScript.write text
}
}
@fancyremarker
fancyremarker / .bash_login.jenkins
Last active March 6, 2023 19:21
[A.] Scripts related to Jenkins client setup
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi