Skip to content

Instantly share code, notes, and snippets.

View OldCrowEW's full-sized avatar
👾
Working from 🏕️

John OldCrowEW

👾
Working from 🏕️
View GitHub Profile
hosts: all
vars:
legit_repos:
- epel: { url: 'http://repo/epel', gpgcheck: 'yes', desc: 'My EPEL Repo' }
- core: { url: 'http://repo/core', gpgcheck: 'yes', desc: 'My core Repo' }
- foo: { url: 'http://repo/foo', gpgcheck: 'no', desc: 'My foo Repo' }
- name: Get Repository Filenames
find:
paths: /etc/yum.repos.d/
@NickCraver
NickCraver / Overview.json
Created March 12, 2019 01:47
Craver's UniFi dashboard layout
{"name":"Overview","desc":"System Overview","controller_version":"5.10.12","modules":[{"id":"default:mega|status","module_id":"mega|status","restrictions":{"removable":false,"draggable":false},"config":{}},{"module_id":"summary|wifi","config":{},"id":"13a78652-ad84-4fcb-943a-86929c638353"},{"module_id":"clients|freq-distribution","config":{"palette":"BLUE_GRADIENT_10"},"id":"c9626f4f-021f-4d46-b22d-86007570bac7"},{"module_id":"clients|top5|active","config":{"trafficType":"total"},"id":"36a9e071-132e-4b4a-baee-250449a6d44f"},{"module_id":"devices|uap|top5|channel-util","config":{"trafficType":"total"},"id":"9803f077-b9cd-4db0-b466-60d92fae2020"},{"module_id":"devices|uap|top5|active","config":{"trafficType":"total"},"id":"e6133049-cc56-44b3-a4c2-b0843912dac5"},{"module_id":"devices|uap|top5|client-count","config":{},"id":"d39f9c80-1827-4ba0-b573-3209789c56b5"},{"module_id":"summary|switching","config":{},"id":"5966437b-54f7-43e6-9c03-2adbdeb3c0a6"},{"module_id":"devices|usw|top5|active","config":{},"id":"c83ac
@ddnomad
ddnomad / luks_on_lvm_arch_linux_guide.sh
Last active April 11, 2023 19:34
Arch Linux installation with a full-disk encryption (LUKS on LVM)
###############################################################################
# Author: ddnomad
# Version: 1.1.3
# Last Update: 2020-07-06
#
# External contributors:
# - u/momasf (https://www.reddit.com/user/momasf) - an excellent
# tip to use 'reflector' to speed up downloads during the base
# installation
# - eXhumer (https://github.com/eXhumer) - Fixes for things that
@bmhatfield
bmhatfield / .profile
Last active March 18, 2024 07:43
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@dcode
dcode / cobbler-pi.md
Created November 20, 2015 18:06
Cobbler Pi - Instructions for setting up cobbler on a Raspberry Pi

Requirements:

  • Raspberry Pi (I used the B+ model)
  • Enough hard drive space for install media (I mounted a 16 GB USB3 drive at /var/www/cobbler/)

Installation

The problem with installing cobbler on a Raspberry Pi, is that it depends on the syslinux package, which is not available for ARM architectures. More importantly, we specifically need the x86 version of syslinux anyway, because it provides the files that will be used to PXE boot systems (which in my case is x86_64 arch).

---
# test SSH agent forwarding
- shell: echo "Client= [$SSH_CLIENT] Sock= [$SSH_AUTH_SOCK]"
sudo: no
register: myecho
- debug: msg="{{myecho.stdout}}"
- shell: ssh-add -l
sudo: no
register: myecho
- debug: msg="{{myecho.stdout}}"
@likwid
likwid / ec2-instance__tasks__main.yml
Created March 11, 2015 16:12
"Idempotent" ec2 creation with ansible
---
- name: Find trusty ami for base image
ec2_ami_search:
distro: ubuntu
release: trusty
region: "{{ aws_region }}"
store: ebs-ssd
virt: hvm
register: ubuntu
when: not aws_ami_id is defined
@ruzickap
ruzickap / ovftool_installation.sh
Created September 27, 2014 13:37
OVFTool installation on ESXi
#Download OVF tools
wget -q ftp://ftp.example.com/software/vmware/installation_scripts/vmware-ovftool.tar.gz -O /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz
# Extract ovftool content to /vmfs/volumes/My_Datastore
tar -xzf /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz -C /vmfs/volumes/My_Datastore/
rm /vmfs/volumes/My_Datastore/vmware-ovftool.tar.gz
# Modify the ovftool script to work on ESXi
sed -i 's@^#!/bin/bash@#!/bin/sh@' /vmfs/volumes/My_Datastore/vmware-ovftool/ovftool
@nsbingham
nsbingham / local-dnsserver.md
Last active June 5, 2023 21:44
Testing a CNAME

Setting up a local DNS server with bind on OSX Mavericks

This is really just an approach for locally testing DNS changes, which can easily be done with a HOSTS file if the change involves an IP address, but gets a bit trickier when things like CNAMEs are involved. This is only meant to test locally off a single machine.

  1. Install bind using homebrew

    brew install bind

  2. Follow the installation steps to start up bind