Skip to content

Instantly share code, notes, and snippets.

View ardichoke's full-sized avatar

Ryan DeShone ardichoke

View GitHub Profile
@ardichoke
ardichoke / bootstrap-puppet.yml
Created September 23, 2022 02:28
Puppet Agent Bootstrap Ansible Playbook
---
- name: Bootstrap Puppet
hosts: all
become: yes
become_user: root
tasks:
- set_fact:
puppet_bin: "{{ '/usr/local/bin/puppet' if ( ansible_facts['architecture'] is regex('^arm') ) else '/opt/puppetlabs/bin/puppet' }}"
- name: Debian ARM Setup
block:
@ardichoke
ardichoke / mailbridge.rb
Last active June 1, 2017 15:01
Ruby script to parse mail and send to Slack using slacktee
#!/usr/bin/env ruby
slacktee = '/usr/local/bin/slacktee.sh'
require 'mail'
require 'syslog'
require 'shellwords'
shortfields = ['to', 'from']
longfields = ['subject', 'date']
slackargs = "-p -a"
mail = Mail.new(STDIN.read)
mail.header.fields.to_a.each do |h|
@ardichoke
ardichoke / bash_eternal_history.sh
Created October 29, 2015 18:48
Eternal bash logging
#!/bin/bash
function log_cmd
{
local mytty=$(tty | sed 's/\/dev\///')
local host=$(who | grep "$mytty " | sed 's/^.*(\(.*\)).*$/[\1]/')
local user=$(ls -l /dev/${mytty} | awk '{print $3}')

Keybase proof

I hereby claim:

  • I am ardichoke on github.
  • I am ardichoke (https://keybase.io/ardichoke) on keybase.
  • I have a public key whose fingerprint is 878D F3A4 A36E 31A4 F831 04A6 A700 D394 BAF4 061B

To claim this, I am signing this object: