Skip to content

Instantly share code, notes, and snippets.

View unacceptable's full-sized avatar
👑
Strange women lying in ponds distributing swords is no basis for a system of ...

Robert J. unacceptable

👑
Strange women lying in ponds distributing swords is no basis for a system of ...
View GitHub Profile
#!/usr/bin/env groovy
import java.util.logging.*
System.setProperty("java.util.logging.SimpleFormatter.format", '%1$tF %1$tT - [%4$s] - %5$s %n')
Logger logger = Logger.getLogger("logger")
logger.info ("I am a test info log")
logger.warning("I am a test warning log")
logger.severe("I am a test error log")
@unacceptable
unacceptable / Check-AWSCreds.sh
Last active October 16, 2019 15:33
This was something that I wrote to check credentials after manual rotation.
#!/usr/bin/env bash
Check-AWSCreds(){
while read -r PROFILE; do
printf "%-20s - " "$PROFILE";
aws sts get-session-token --profile "$PROFILE" &> /dev/null &&
printf "\e[38;5;2mworking\e[0m\n" ||
printf "\e[38;5;1mbroken\e[0m\n"
done < <(
grep '\[' ~/.aws/credentials | \
function Show-Warning {
param(
[Parameter(Mandatory=$true)][string]$Message,
[int]$TimeoutInSeconds = 10
)
Add-Type -AssemblyName System.Windows.Forms
$global:balloon = New-Object System.Windows.Forms.NotifyIcon
$path = (Get-Process -id $pid).Path
#!/usr/bin/env bash
AWS_PROFILE='test'
UPDATE_POLICY='{
"Statement" : [
{
"Effect" : "Allow",
"Action" : "Update:*",
"Principal": "*",
#!/usr/bin/env groovy
import java.util.logging.Logger
class global {
static String WEBHOOK = "https://hooks.slack.com/services/not/telling/you"
}
def call(status, channel) {
Logger logger = Logger.getLogger(this.getClass().getName())
echo sh(returnStdout: true, script: 'env')
FROM ubuntu:18.04
COPY [".", "/tmp"]
RUN apt-get update
RUN apt-get install -y ffmpeg
RUN ffmpeg \
-i /tmp/audio.wav \
-codec:a libmp3lame \
-qscale:a 2 \
#!/usr/bin/env bash
set -e
AUTHOR="Robert J."
GIT_DIR="$HOME/Git"
print(){
var="$1";
size="${#var}";
printf -v sep "%${size}s" "-";
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "*",
"Condition": {
"BoolIfExists": {
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "iam:*",
"Resource": [
"arn:aws:iam::*:user/${aws:username}",
"arn:aws:iam::*:mfa/${aws:username}"
]