Skip to content

Instantly share code, notes, and snippets.

View DevoKun's full-sized avatar

Devon Hubner DevoKun

View GitHub Profile
@DevoKun
DevoKun / Deploy_go_application_to_Elastic_Beanstalk.md
Created November 25, 2017 03:56
How to deploy GO applications to Elastic Beanstalk without or with Docker

Deploy go application to Elastic Beanstalk

non-Docker Elastic Beanstalk GO

@DevoKun
DevoKun / kafka.md
Created July 13, 2018 02:52
How to operate Kafka, mostly using Docker

Kafka Distributed Streaming Platform

Publish and Subscribe / Process / Store

Start Kafka

  • Kafka uses ZooKeeper as a distributed backend.

Start Zookeeper

@DevoKun
DevoKun / remove_management_interface_vmk0_from_pre-existing_distributed_virtual_switch_vds_and_attached_to_port_group_on_new_virtual_switch.md
Last active July 18, 2018 13:53
Remove Management Interface (vmk0) from pre-existing Distributed Virtual Switch (VDS) and attached to Port Group on new Virtual Switch

Remove Management Interface (vmk0) from pre-existing Distributed Virtual Switch (VDS) and attached to Port Group on new Virtual Switch

List existing ports

esxcfg-vswitch -l
esxcli network vswitch dvs vmware list 
esxcfg-vswitch -Q vmnic0 -V ${DVS_ID_FROM_ABOVE} ${DVS_NAME}
@DevoKun
DevoKun / bash_prompt_command_flip_table.md
Last active October 24, 2018 02:13
Configure bash shell config to flip a table whenever a command fails with a non-zero exit status.
export COLOR_NC='\e[0m'
export COLOR_BLUE='\e[0;34m'
export COLOR_GREEN='\e[0;32m'
export COLOR_CYAN='\e[0;36m'
export COLOR_RED='\e[0;31m'
export COLOR_BROWN='\e[0;33m'
export COLOR_YELLOW='\e[1;33m'

export PROMPT_COMMAND='[ $? -eq 0 ] || printf "${COLOR_CYAN}(${COLOR_GREEN}╯${COLOR_NC}${COLOR_BLUE}°${COLOR_CYAN}□${COLOR_BLUE}°${COLOR_CYAN})${COLOR_GREEN}╯${COLOR_RED}︵ ${COLOR_BROWN}┻━┻${COLOR_NC}\n"'
@DevoKun
DevoKun / basicAuthHandler.js
Created October 29, 2018 01:55
Amazon Lambda HTTP Basic Auth using ClaudiaJS
var ApiBuilder = require('claudia-api-builder'),
api = module.exports = new ApiBuilder(),
renderPage = function (body) {
'use strict';
return body;
};
const authUser = 'user',
authPass = 'pass',
@DevoKun
DevoKun / urlcheck.sh
Last active November 16, 2018 02:37
Check for Broken Links using wget
wget --spider -r -nd -nv http://0.0.0.0:4000/ 2>&1 | tee urlcheck.log
egrep --color=auto -A5000 'Found [0-9]+ broken links.' urlcheck.log
@DevoKun
DevoKun / install_from_epel.sh
Last active January 11, 2019 19:35
Install 7zip and Supervisor on Amazon Linux using the EPEL repo
yum install -y epel-release
yum --enablerepo=epel install -y p7zip
yum --enablerepo=epel install -y supervisor
@DevoKun
DevoKun / git_commit_past.sh
Created February 18, 2019 15:45
Make a git commit in the past
export GIT_COMMITTER_DATE="Sep 8, 2012 13:33:48 PM GMT-0500"
git add makepass.exe makepass.lst makepass_exe.md
git commit --date "${GIT_COMMITTER_DATE}" -m "Added MakePass.EXE info from archive.org." makepass.exe makepass.lst makepass_exe.md
export GIT_COMMITTER_DATE="Sep 8, 2012 20:20:20 AM GMT-0500"
git add index.php
@DevoKun
DevoKun / .vimrc
Created February 21, 2019 01:24
VIM: Switching off auto-indentation
" Switch off all auto-indenting
set nocindent
set nosmartindent
set noautoindent
set indentexpr=
filetype indent off
filetype plugin indent off
@DevoKun
DevoKun / expand-qcow2-disk-image.sh
Created February 21, 2019 02:09
Expand qcow2 disk image
qemu-img resize disk.qcow2 +2G