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
@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"}'
---
- name: create some vms
hosts: localhost
connection: local
vars_prompt:
- name: "vcenter_host"
prompt: "Enter vcenter host"
private: no
default: "vcsa"
- name: "vcenter_user"
" 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
# 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.
#
@AnthonyWC
AnthonyWC / a2dp.py
Created June 9, 2017 18:08 — forked from pylover/a2dp.py
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3.5
"""
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
@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.
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBQkaB5rQXDDIgxSQKs16gbfzmpSK774B892qI9VkOL6CDIXWbpeuX8mU+r7FWZtBEK10BuOBe4dRz59ucGCjnkQ50j/u9pzl+XHcBDS9MtdwVN07rrUwUrIh+GyUV6G+oFvYO7cJ2fJxSIr6ulehEvWwyUkQpKnqtdBczeChmfCGDz9wMK1EKWRRRU6sqAu5uElNU0HZ+KqLdbS7KS0g9axqbF6mk5851GNzOQGk9P7xXKSiaqgTDSBfaxYKRf08gT6udhidKn4evhF8VYWKCU5gzKmcWXEaHaL9RAd3wRgIOpJQQqwDijKRvZ1aMSUn5hurCYTBJ+m/7Mg6FGr8J antho@NY-ACheng
@AnthonyWC
AnthonyWC / lifecycle-cheat-sheet.md
Created August 14, 2019 15:12 — forked from HyperBrain/lifecycle-cheat-sheet.md
Serverless Lifecycle Cheat Sheet

Serverless plugin author's cheat sheet

This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.

Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,

#!/bin/zsh
###################
# Mac version
###################
CUR_DIR=$(pwd)
# If you come from bash you might have to change your $PATH.
# Path to your oh-my-zsh installation.
#!/bin/zsh
###################
# Mac version
###################
CUR_DIR=$(pwd)
# If you come from bash you might have to change your $PATH.
# Path to your oh-my-zsh installation.