Skip to content

Instantly share code, notes, and snippets.

View prelegalwonder's full-sized avatar

Prelegal Wonder prelegalwonder

View GitHub Profile
@prelegalwonder
prelegalwonder / SedComment
Created April 21, 2015 19:39
Comment out matched lines in Sed.
#!/bin/bash
for i in `cat policy-redo.txt | grep "Filename:" | awk '{ print $3 }'`
do
sed -i '/^\(.*\)#/!'" s|\(^.*$i.*$\)|#\1|" twpol.txt
done
@prelegalwonder
prelegalwonder / vimrc
Created August 25, 2015 14:00
My Vim config
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 / tfvault.py
Created March 30, 2020 15:45
TF - Ansible Vault External Datasource
#!/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')