Skip to content

Instantly share code, notes, and snippets.

@lichnak
lichnak / answer.sh
Created March 17, 2020 20:09 — forked from alganet/answer.sh
Capturing keyboard events on any shell
#!/usr/bin/env sh
# This script captures keyboard events on popular POSIX Shells.
#
# Run it by executing ./answer.sh and press the arrow keys
# to see the capture exemple. Press Return to exit.
#
# It has been tested on:
# - Windows (Git Bash and MSYS+Mintty)
# - OS X (native terminal, Yosemite)
@lichnak
lichnak / rules-both.iptables
Created February 14, 2020 19:09 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# 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
@lichnak
lichnak / install.sh
Created November 16, 2019 15:23 — forked from enricobacis/install.sh
openstack installation on CentOS 7
#!/bin/bash
ifconfig
read -p "Enter your external interface: " EXT_INTER
# do not edit after this line
set -x # enable echo
sudo yum install -y epel-release
sudo yum install -y vim git tmux bash-completion net-tools htop psmisc
@lichnak
lichnak / cluster-issuer.yaml
Created September 3, 2019 10:58 — forked from ppwfx/cluster-issuer.yaml
single node kubernetes cluster [tested on Ubuntu 18.04 LTS]
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
namespace: default
spec:
acme:
email: youremail@example.com
server: https://acme-v02.api.letsencrypt.org/directory
privateKeySecretRef:
@lichnak
lichnak / setup-kubernetes-ubuntu-16.md
Created September 2, 2019 06:02 — forked from TRoetz/setup-kubernetes-ubuntu-16.md
Install a 3 Node Kubernetes Cluster on Ubuntu 18.04

Master: Dependencies

DISABLE SWAP: This is how to disable the swap file in Ubuntu 17.04

To turn off the swapfile. Run the following command:

sudo swapoff /swapfile

Now disable the swap file in /etc/fstab. I'm using Vim.

@lichnak
lichnak / bobp-python.md
Created August 7, 2019 08:50 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@lichnak
lichnak / Openvswitch LTS in CentOS 7.md
Created July 19, 2019 09:36 — forked from umardx/Openvswitch LTS in CentOS 7.md
Installation Openvswitch LTS in CentOS 7

Based on this post: https://n40lab.wordpress.com/2016/03/02/openvswitch-lts-in-centos-7 The most recent release from the LTS series: http://openvswitch.org/releases/openvswitch-2.5.4.tar.gz

Instructions:

As the root user let’s install some packages:

yum -y install wget openssl-devel gcc make python-devel openssl-devel kernel-devel graphviz kernel-debug-devel autoconf automake rpm-build redhat-rpm-config libtool python-twisted-core python-zope-interface PyQt4 desktop-file-utils libcap-ng-devel groff checkpolicy selinux-policy-devel
@lichnak
lichnak / init-single-node-ceph.sh
Created July 15, 2019 09:40 — forked from kofemann/init-single-node-ceph.sh
Single node CEPH setup
#
# Enable CEPH repos as described at http://ceph.com/docs/master/install/get-packages/#rpm
# Install ceph-deploy package
#
export DATA_DEV=sdb
export JRNL_DEV=sdc
export FS_TYPE=xfs
export CEPH_S_NODE=ceph-s
export CEPH_RELEASE=giant
kubectl get services # List all services
kubectl get pods # List all pods
kubectl get nodes -w # Watch nodes continuously
kubectl version # Get version information
kubectl cluster-info # Get cluster information
kubectl config view # Get the configuration
kubectl describe node <node> # Output information about a node
kubectl get pods # List the current pods
kubectl describe pod <name> # Describe pod <name>
kubectl get rc # List the replication controllers
Requirements
------------------
- The GNU C compiler. We generally test with version 4.1, 4.2, or
4.3.
- pkg-config. We test with version 0.22.
- libssl, from OpenSSL, is optional but recommended if you plan to
connect the Open vSwitch to an OpenFlow controller. libssl is