Skip to content

Instantly share code, notes, and snippets.

View zed-eiq's full-sized avatar

Zed Tan zed-eiq

View GitHub Profile

group_vars and Ansible variables

What it says on the tin: the group_vars directory contains variable definitions for inventory groups.

This is a way to scope variables to a given inventory group. We can define variables for the elasticsearch inventory group that are not accessible by plays running on the application inventory group.

Ansible expects the following directory structure:

dnf install -y epel-release
dnf install -y zsh git unzip tcpdump neovim tmux jq fzf ripgrep
lchsh root <<<echo "/bin/zsh"
mkdir -p "${HOME}/.config/nvim/"
## https://builtin.com/software-engineering-perspectives/neovim-configuration
cat<<"EOF">"${HOME}/.config/nvim/init.vim"
set nocompatible " disable compatibility to old-time vi
import json
from datetime import datetime
TRACE_ID='45b893611ffd06a3cfb3cbfe93e1f601'
RUN_ID='579c4210-5dc3-4562-b3a6-916e090f6d81'
def get_timestamp(timestamp: str) -> datetime:
return datetime.strptime(timestamp,"%Y-%m-%dT%H:%M:%S.%fZ")
def main():
# This file is automatically generated, DO NOT MODIFY.
"TRUE","RST","tcp.flags == 0x0004","Get all RST packets"
"TRUE","RSTACK","tcp.flags == 0x0014","RSTACK -- where connection is interrupted by one end closing it abruptly"
"TRUE","FINACK","tcp.flags == 0x0011","Get all FINACK packets"
"TRUE","SYNACK","tcp.flags == 0x0012",""
#!/usr/bin/env bash
for i in *.svg; do echo $i; d=$(echo $i | cut -d'-' -f1); date -d @${d} ; done
#!/usr/bin/env bash
### Small script to get AWS EC2 instance ID from 'kubectl describe node'
alias k=kubectl
while getopts ":n:" opt; do
case ${opt} in
n) NODE=${OPTARG}
;;
#!/usr/bin/env bash
# sh doesn't support arrays
# Helper script that
# 1. SSH-es into remote hosts
# 1. Runs firewall-cmd on remote hosts to open up ports needed
set -e
FW_COMMON="--zone=public --permanent"
APPLICATION=("192.168.1.169")
this is a test table
adsf adsfa asdf asdf asdf
+------+-+-+-
test a
multiline table

grid tables

+------------+--------------------------------+

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKjz5T3ofzG7CkWrYaTDSvkLOWMulDhovBf0Ijq0nB+C zeddee@turnip
@zed-eiq
zed-eiq / .gitignore
Created October 11, 2020 22:23 — forked from kmorcinek/.gitignore
Example .gitignore file I use for C# projects
# The following command works for downloading when using Git for Windows:
# curl -LOf http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
#
# Download this file using PowerShell v3 under Windows with the following comand:
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
#
# or wget:
# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
# User-specific files