Skip to content

Instantly share code, notes, and snippets.

View alpozcan's full-sized avatar

Alp alpozcan

View GitHub Profile
@alpozcan
alpozcan / vault-aws-login.sh
Created April 19, 2023 02:15
Logs into Vault using an assumed AWS Role
#!/usr/bin/env bash
# Logs into Vault using an assumed AWS Role
# context: https://github.com/hashicorp/vault/issues/5767
# based on: https://gist.githubusercontent.com/Westixy/bc70ee782fe759094bf5c1c65c248f6c/raw/34ee1b3c17beddb5badaf4ad4d32afef208bfd84/vault-aws.sh
set -e
THIS=`basename "${0}"`
AWS_ROLE_ARN="$1"
@alpozcan
alpozcan / retroarch-playlist-generator.py
Last active September 13, 2020 04:48
Generates RetroArch-compatible playlists from directories containing zipped roms
#!/usr/bin/env python3
# Generates RetroArch-compatible playlists from directories containing zipped roms
# Copy this script into ~/.config/retroarch and Set ROM_DIR below to the directory containing the system subdirectories with roms
# These system subdirectories must be named the same way as the RetroArch's playlist names i.e. "Vendor - Console_Model"
import glob, json, os
from zipfile import ZipFile
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
PL_DIR = f'{BASE_DIR}/playlists'
@alpozcan
alpozcan / vault-otp.te
Last active July 12, 2019 00:36
selinux-vault-otp
module vault-otp 1.0;
require {
type var_log_t;
type sshd_t;
type http_port_t;
class file open;
class file create;
class tcp_socket name_connect;
}