- Download script
travis-encrypt.sh
- Make it executable
chmod +x travis-encrypt.sh
- Run the script with
./travis-encrypt.sh -r username/repositoryname -e example
- It will return something like
O+woVD9K+PeFrcyu5GCjKSFvfcSPwDW0kyDYEQnNbwt/iSkqjpl2OPA9W//KEKEB9UUSZD+XmQ3Ij0gnvJnOowcWY5sSeJlVEVTrSer0kW6uWpa/uWzDHCBz2YhBnI6u9SfYfMkhDl22pcaCEwaUkmK2gjcVo+v0bS8vAQFz0Na5/WiKj0GkSX50iIGgfaXheuC8KgIC25T0h+czpap7vb13OlblMnClfyTH9+TmAwTlcV7ljXpv1QY+K72L8jK1/CQVZ8quBYrBwwxO2V6cpXRMMCIw4m4lqxUyN4FBGnq7cJ7BWLzeqSMpFBoP+ZxAqS5yem8KLh1VkEo7PVjCkZE6M+2meFf2VJEVUs/KJY9xnH3eDzipWkwXon2qVpCkT7FDEzGFs/DapYsSo7eCO6pUYYhcpaYpWeYV9DSSV0QcrOeZp664iJMHWPSmrs/lESbbHpKWsM/AFVB9X75q/OB+QU0tQxpReZmKw3ZHbDVMlmlwhP8VSiQ05LV2W6gYzADGiUiL6n1X8teeHEVDSZnD7nrxMD/FchnWI5La3tZeFovRMf6hH3NItW+QZaGaGNftJrP488J/F2hCycPJk3+YrxbBCGHE2X379QbkMz3S0B5UiAcJKmwuTstF6X3CCurZVYIkUGGXhnmalPtVpEqxeTiLw5RU6C9z2qSwhhw=
- It will return something like
- Use the encrypted secret in your
.travis.yml
according to https://docs.travis-ci.com/user/encryption-keys/#Usage
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
# Source this script to load your tokens from `pass` into your current session | |
# | |
# Not brilliant but better than having them hang out forever | |
# Number of seconds to keep your tokens in your session | |
# Suggest making it slightly random so you don't accidentally kill some other sleep | |
keep_seconds=1234 | |
function tokens_clear() { |
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 | |
args="${@}" | |
container=<container>:<release> | |
uid=$( podman run --rm -it $container id -u | tr -d [:space:] ) | |
gid=$uid | |
subuidSize=$(( $(podman info --format "{{ range .Host.IDMappings.UIDMap }}+{{.Size }}{{end }}" ) - 1 )); |
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/ruby | |
# Get application and stack size in a form useful for using with pam_limits | |
require 'json' | |
PAGE_SIZE = %x(getconf PAGESIZE).to_i | |
UID = Process.uid | |
mem_info = Hash.new |
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/sh | |
set -e | |
container_name="centos:8" | |
clean_container_name=$( echo "${container_name}" | tr ':' '_' ) | |
export_file="${clean_container_name}.tar" | |
if [ -f "${export_file}" ]; then | |
echo "Found ${export_file}; remove the file to re-extract" |
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/sh | |
aspell -l en dump master | grep -v "'" | grep -v "^[[:upper:]]" | sort -n | grep -x '.\{3,10\}' > test_dict |
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
ruby -rjson -rpp -e 'output={}; File.read("/var/log/tlog.log").lines.map{|x| l=x.split(/\s/); foo=JSON.load(l[3..-1].join(" ")); output[foo["rec"]] ||= {:user => foo["user"], :start_time => l[0]}; output[foo["rec"]][:end_time] = l[0]}; pp output' |
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
polkit.addRule(function(action, subject) { | |
if (action.id == "org.libvirt.unix.manage" && subject.local && subject.active && subject.isInGroup("wheel")) { | |
return polkit.Result.YES; | |
} | |
}); |
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
require 'yaml' | |
require 'nokogiri' | |
# This is extracted from the DISA STIG content | |
input_doc = 'U_Red_Hat_Enterprise_Linux_7_STIG_V1R2_Manual-xccdf.xml' | |
# You have to pull this file out of the STIGViewer Java JAR file | |
cci_mapping = 'U_CCI_List.xml' | |
def cci2nist(cci, ccidoc) |
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 ruby | |
git_log = %x{git log --name-status --diff-filter=AD}.lines.select{ |x| | |
x =~ /\s*(A|D)\s+/ | |
}.map(&:strip) | |
deleted = [] | |
added = [] | |
git_log.each do |logline| |
NewerOlder