Skip to content

Instantly share code, notes, and snippets.

@prelegalwonder
prelegalwonder / tfvault.py
Created Mar 30, 2020
TF - Ansible Vault External Datasource
View tfvault.py
#!/usr/bin/env python
import string,sys,os,types
import json
from ansible_vault import Vault
def readPass(passFile):
try:
file = open(passFile, 'r')
contents = file.read()
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
prelegalwonder / SedComment
Created Apr 21, 2015
Comment out matched lines in Sed.
View SedComment
#!/bin/bash
for i in `cat policy-redo.txt | grep "Filename:" | awk '{ print $3 }'`
do
sed -i '/^\(.*\)#/!'" s|\(^.*$i.*$\)|#\1|" twpol.txt
done