Skip to content

Instantly share code, notes, and snippets.

View alikhil's full-sized avatar
🎯
Focusing

Alik Khilazhev alikhil

🎯
Focusing
View GitHub Profile
@timothyham
timothyham / ipv6guide.md
Last active October 23, 2025 20:41
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

@renatoccosta
renatoccosta / install-ha-opi5.adoc
Last active October 11, 2025 21:15
Install Home Assistant on OrangePi 5

Installing Home Assistant on OrangePi 5 Board

This tutorial will enable the use of Home Assistant on an OrangePi 5 board with the following characteristics:

  • OrangePi Debian OS

  • OS running on a SDCard

  • Home Assistant Supervised Instalation

The steps are a compilation with few modifications from instructions found over the web. Links are at the end.

@lzakharov
lzakharov / GOLAND_TEST_LIVE_TEMPLATE.go
Created March 31, 2021 08:58
GoLand live template for the test functions.
func Test$NAME$(t *testing.T) {
type args struct {
$ARGS$
}
type want struct {
$WANT$
}
test := func(args args, want want) func(t *testing.T) {
return func(t *testing.T) {
@mustakimali
mustakimali / goaccess-kubernetes-nginx-ingress.py
Last active February 9, 2022 20:40
Gets logs from nginx-ingress container and generate GoAccess dashboard for each of the services + all combined (Blog: https://mustak.im/server-side-kubernetes-nginx-ingress-log-analysis-using-goaccess/)
#!/usr/bin/python
import os
import subprocess
def process_log_for_svc(svc,out):
print('Processing ' + svc)
os.system("rm -f /storage/goaccess/imported-logs/imported-log.log")
os.system('find /var/log/containers/ | grep nginx-ingress | xargs sudo cat | grep ' + svc + ' >> /storage/goaccess/imported-logs/imported-log.log')
@jackblk
jackblk / squid_proxy_tutorial.md
Last active June 11, 2025 06:56
Tutorial on how to setup a squid proxy with authentication.

Note

This tutorial is for Ubuntu & Squid3. Use AWS, Google cloud, Digital Ocean or any services with Ubuntu to follow this tutorial.

Install squid & update

sudo apt-get update
sudo apt-get install squid3
sudo apt-get install apache2-utils
@karthik101
karthik101 / Readonly user for Kubernetes Dashboard.md
Last active June 12, 2023 16:32
Read only user for Kubernetes Dashboard

The view ClusterRole doesn’t actually have permissions for the Cluster level objects like Nodes and Persistent Volume Claims. So we’ll have to create a new RBAC config.

First, we’ll create a new dashboard-viewonly ClusterRole:

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: dashboard-viewonly
@svx
svx / delete-evicted-pods-all-namespaces.sh
Created August 15, 2018 12:45 — forked from psxvoid/delete-evicted-pods-all-namespaces.sh
Delete evicted pods from all namespaces (also ImagePullBackOff and ErrImagePull)
#!/bin/sh
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d
# delete all evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff state from all namespaces
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces
@nadavrot
nadavrot / Matrix.md
Last active October 16, 2025 09:22
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@amit-chahar
amit-chahar / download-script.sh
Last active February 20, 2023 12:57
Scirpt to download files from Google drive using curl (Detailed explanation can be read here: https://stackoverflow.com/a/49444877/4043524)
#!/bin/bash
fileid="FILEIDENTIFIER"
filename="FILENAME"
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
@alikhil
alikhil / Dockerfile
Created January 12, 2018 14:56
PostgreSQL with Russian Hunspell dictionary in docker
FROM postgres:9.6
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y git \
&& apt-get install -y build-essential \
&& apt-get install -y postgresql-server-dev-9.6 \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p hunspell \
&& cd hunspell \