Skip to content

Instantly share code, notes, and snippets.

View shaposhnikoff's full-sized avatar
🏠
Working from home

Shaposhnikoff shaposhnikoff

🏠
Working from home
  • Kiev,Ukraine
  • 02:50 (UTC +02:00)
View GitHub Profile
@shaposhnikoff
shaposhnikoff / rules-both.iptables
Created October 7, 2023 17:25 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <[email protected]>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@shaposhnikoff
shaposhnikoff / k3s-cluster.md
Created September 27, 2023 14:36 — forked from kopwei/k3s-cluster.md
K3s and Rancher on Raspberry Pi 4 Cluster

Deploy K3s and Rancher on Raspberry Pi 4 cluster

Today I tried to setup a small Kubernetes cluster on top of 3 Raspberry Pi 4 (4GB Memory). Here is the steps to install the cluster.

IMG_3817

Preparation

I have 3 Raspberry Pi 4 stacked with PoE headers and connected to a PoE switch at home. The are connected to Internet through a home router. All Pis are equipped with a 64GB Samsung SDXC card flushed with Ubuntu 20.04 image.

apiVersion: v1
kind: Namespace
metadata:
name: ns1
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: prometheus-example-app
@shaposhnikoff
shaposhnikoff / hairpin.sh
Created August 21, 2023 07:19
Mikrotik Hairpin NAT
/ip firewall nat
add chain=dstnat dst-address-type=local protocol=tcp dst-port=443 action=dst-nat to-address=10.0.0.5 to-port=443
add chain=srcnat src-address=10.0.0.0/24 dst-address=10.0.0.5 protocol=tcp dst-port=443 out-interface=LAN action=masquerade

Terrafrom Logo

Terraform - The Missing Manual

Infrastructure-as-Code is a principal that drives modern DevOps practice. I discuss the current state of Terraform and provide some basic guidelines/principles regarding how to structure it's usage for your project.

Tables of Contents

@shaposhnikoff
shaposhnikoff / kind.txt
Created June 12, 2023 14:04 — forked from devnut/kind.txt
kind setup
1. install kind:
go or go1.20.3 install sigs.k8s.io/[email protected]
2. create a 3-node worker cluster by creating a yml file like this:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
@shaposhnikoff
shaposhnikoff / create-repo-metadata.sh
Created May 14, 2023 12:15 — forked from fernandoaleman/create-repo-metadata.sh
Script to create rpm repository metadata
#!/bin/sh
# This is for Redhat 64 bit versions of Linux with `createrepo` installed. If you
# do not have createrepo, you can install it with:
# yum install -y createrepo
# Change DESTDIR path to RPMS directory of your repo
DESTDIR="/var/www/repo/rhel/6"
for ARCH in x86_64
@shaposhnikoff
shaposhnikoff / create_rpmrepo.sh
Created May 14, 2023 12:15 — forked from ivoarch/create_rpmrepo.sh
Create RPM Repository for Rhel/CentOS
#!/bin/bash
# Create RPM Repository for Rhel/CentOS
ftpdir="$HOME/Dropbox/Public/rpmrepo"
releases=(el6 el7)
for release in "${releases[@]}"; do
for dir in i386 x86_64 SRPMS; do
pushd "${ftpdir}/${release}/${dir}" >/dev/null 2>&1
createrepo -v .
@shaposhnikoff
shaposhnikoff / keyer.sh
Created April 20, 2023 18:29 — forked from f4iey/keyer.sh
Simple script to use ICOM IC-705 internal CW keyer via hamlib
#!/bin/zsh
#
# Script to get simple cw macros or free typing on the ICOM IC-705
#
# Make sure CI-V Transceive is ON and USB Echo Back is OFF
callsign=TM22YOTA
echo -e "Welcome. Press CTRL+C to exit...\n"
while true
do
echo "CW: "