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 | |
# 2017-04-02 12:30 quick and dirty ls-leases | |
# sed combine lines: http://stackoverflow.com/a/7853846/3569534 | |
DEFAULT_LEASE_FILE=/var/lib/dhcpd/dhcpd.leases | |
leasefile="${DEFAULT_LEASE_FILE}" | |
#leasefile=/home/bgirton-local/foo | |
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
convert_to_seq() { | |
printf "${@}" | xargs -n1 -d',' | tr '-' ' ' | awk 'NF == 2 { system("/bin/seq "$1" "$2); } NF != 2 { print $1; }' | xargs | |
} | |
convert_to_seq "$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
--- | |
# File: /etc/ansible/playbooks/prod/update_root_pw.yml | |
# Authors: bgstack15 | |
# Startdate: 2017-10-24 | |
# Title: Playbook that updates the local root password | |
# Purpose: Makes it easy to update the root password | |
# Usage: | |
# time ansible-playbook /etc/ansible/playbooks/prod/update_root_pw.yml -i /etc/ansible/dc3.inv -l el7test14 -v --ask-vault-pass | |
# Make file /home/ansible/rootpw.yml with the contents: | |
# --- |
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
Name: xfe | |
Version: 1.42 | |
Summary: X File Explorer (Xfe) is a file manager for X. | |
Release: 1{?dist} | |
License: GPL | |
Group: File tools | |
Requires: fox >= 1.6 libpng >= 1.2 | |
BuildRequires: fox-devel >= 1.6 libpng-devel >= 1.2 glib-devel libXft-devel freetype-devel gcc-c++ | |
Source: %{name}-%{version}.tar.gz | |
Packager: Roland Baudin <[email protected]> |
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 | |
# read stdin | |
grep -oE 'href=\".+\"' | sed -r -e 's/^href=\"//g;' -e 's/\"\s*$//;' |
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
htmlize () { $( which sed ) -r -e 's/</\xCAlt;/g;' -e 's/>/\xCAgt;/g;' -e 's/\&/\&amp;/g;' -e 's/\xCA([lg])t;/\&\1t;/g;' ; } |
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 | |
# File: hash-cert-dir.sh | |
# Location: /etc/ansible/roles/general_conf/files/hash-cert-dir.sh | |
# Author: [email protected] | |
# Startdate: 2017-12-18 | |
# Title: Script that Makes Symlinks for Certs in a Directory | |
# Purpose: Make a directory suitable for openldap to use as TLS_CACERTDIR | |
# History: | |
# Usage: | |
# HCD_SOURCEDIR=/etc/pki/ca-trust/source/anchors HCD_LINKDIR=/etc/openldap/cacerts hash-cert-dir.sh |
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 | |
# Filename: userinfo.sh | |
# Author: [email protected] | |
# Startdate: 2018-01-03 16:11 | |
# Title: Script that Displays User Info | |
# Purpose: Displays specific metrics this environment would like to query | |
# History: | |
# Usage: | |
# Reference: | |
# id -Gnz https://stackoverflow.com/questions/14059916/is-there-a-command-to-list-all-unix-group-names/29615866#29615866 |
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
--- | |
# Filename: access_like.yml | |
# Location: /etc/ansible/playbooks/access_like.yml | |
# Author: bgstack15 | |
# Startdate: 2018-02-01 15:00 | |
# Title: Playbook that Sets Access Like a User for a Different User | |
# Purpose: To make it easy to set up similar user access | |
# History: | |
# 2018-02-02 Add sssd support | |
# 2018-02-09 Add basic sudoers checking |
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
# Example script name: fetch | |
clean_fetch() { | |
# Delayed cleanup | |
if test -z "${FETCH_NO_CLEAN}" ; | |
then | |
nohup /bin/bash <<EOF 1>/dev/null 2>&1 & | |
sleep "${FETCH_CLEANUP_SEC:-300}" ; /bin/rm -r "${FETCH_TMPDIR:-NOTHINGTODELETE}" 1>/dev/null 2>&1 ; | |
EOF | |
fi | |
} |
OlderNewer