Skip to content

Instantly share code, notes, and snippets.

View AnthonyWC's full-sized avatar
💭
The Net is Vast and Infinite.

AnthonyWC AnthonyWC

💭
The Net is Vast and Infinite.
View GitHub Profile
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
" Turn off jedi-vim
" let g:jedi#auto_initialization = 0
autocmd ColorScheme * highlight UnwanttedTab ctermbg=red guibg=darkred
autocmd ColorScheme * highlight TrailSpace guibg=red ctermbg=darkred
autocmd ColorScheme * highlight ExtraWhiteSpace guibg=red ctermbg=red
autocmd BufRead,BufNewFile ~/etc/ansible/* set syntax=ansible
" autocmd FileType python set omnifunc=pythoncomplete#Complete
highlight UnwanttedTab ctermbg=red guibg=darkred
@AnthonyWC
AnthonyWC / .zshrc
Last active May 8, 2018 03:27
My ZSH setup for babun (https://github.com/babun)
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Look in ~/.oh-my-zsh/themes/
#ZSH_THEME="babun"
ZSH_THEME="agnoster"
plugins=(git)
source $ZSH/oh-my-zsh.sh
# Uncomment the following line to use case-sensitive completion.
@AnthonyWC
AnthonyWC / vswitch-lldp.sh
Created March 3, 2016 19:10
Enable vSwitch LLDP for all VMNIC interfaces
VSISH_VSWITCH_PATH=/net/portsets
for vSwitch in $(vsish -e ls ${VSISH_VSWITCH_PATH});
do
VSWITCH=$(echo ${vSwitch} | sed 's/\///g')
for port in $(vsish -e ls ${VSISH_VSWITCH_PATH}/${vSwitch}ports);
do
PORT=$(echo ${port} | sed 's/\///g')
PORTINFO=$(vsish -e get ${VSISH_VSWITCH_PATH}/${vSwitch}ports/${port}status | sed 's/^[ \t]*//;s/[ \t]*$//');
CLIENT=$(echo ${PORTINFO} | sed 's/ /\n/g' | grep "clientName:" | awk -F ":" '{print $2}')
MACADDRESS=$(echo ${PORTINFO} | sed 's/ /\n/g' | grep "unicastAddr:" | uniq | sed 's/unicastAddr://;s/\(.*\)./\1/')
---
- name: create some vms
hosts: localhost
connection: local
vars_prompt:
- name: "vcenter_host"
prompt: "Enter vcenter host"
private: no
default: "vcsa"
- name: "vcenter_user"
@AnthonyWC
AnthonyWC / gist:989acc2eae0b13a79d4d
Created February 9, 2016 14:41 — forked from davidsnyder/gist:7668060
Kafka Troubleshooting
You can use the consumer script to verify that data is being received by the http listener (http_producer) on port 80 of the Kafka broker node.
sudo /usr/local/share/kafka/bin/kafka-console-consumer.sh --zookeeper [zk-private-ip]:2181 --topic [topic] --from-beginning
If you curl records at the kafka http listener, you should see them come out at the kafka broker node:
(On the Kafka listener node)
curl -XGET localhost:80 -d '{"name":"Bill","position":"Sales"}'