Skip to content

Instantly share code, notes, and snippets.


Andrew Replogle prelegalwonder

View GitHub Profile
prelegalwonder /
Created Mar 30, 2020
TF - Ansible Vault External Datasource
#!/usr/bin/env python
import string,sys,os,types
import json
from ansible_vault import Vault
def readPass(passFile):
file = open(passFile, 'r')
contents =
cleaned = contents.strip('\n')
View vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
prelegalwonder / SedComment
Created Apr 21, 2015
Comment out matched lines in Sed.
View SedComment
for i in `cat policy-redo.txt | grep "Filename:" | awk '{ print $3 }'`
sed -i '/^\(.*\)#/!'" s|\(^.*$i.*$\)|#\1|" twpol.txt