This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SOURCE=${BASH_SOURCE[0]} | |
while [ -L "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | |
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd ) | |
SOURCE=$(readlink "$SOURCE") | |
[[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | |
done | |
SCRIPT_DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eou pipefail | |
# This is probably waaay too long. | |
CERTIFICATE_VALID_DAYS=36500 | |
NAME="$(getent passwd $(whoami) | awk -F: '{print $5}')" | |
OUTPUT_DIR="/root/module-signing" | |
KEY_FILE="${OUTPUT_DIR}/MOK.priv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FIXME Rails has-one through is nil on unpersisted objects (bug) | |
# https://github.com/rails/rails/issues/33155 | |
module ActiveRecordUnpersistedHasOneFix | |
extend ActiveSupport::Concern | |
# Define utility methods | |
class << self | |
# @return [Array<String>, nil] | |
def association_path(model_class, association) | |
path = [] |
OlderNewer