Skip to content

Instantly share code, notes, and snippets.

@avoidik
avoidik / README.md
Created April 10, 2021 21:27
Filter kubectl events relevant to particular object
kubectl get events --sort-by=.metadata.creationTimestamp -o json | jq -r '.items[] | select(.involvedObject.name | startswith("sample-application")) | (.lastTimestamp + " - " + .message)'
@avoidik
avoidik / 424808388956c0d6acf0e91ca751fe9345f6e7f8.patch
Last active May 4, 2025 20:58
Vagrant up issue with Windows Terminal
From 424808388956c0d6acf0e91ca751fe9345f6e7f8 Mon Sep 17 00:00:00 2001
From: "Vasilyev, Viacheslav" <avoidik@gmail.com>
Date: Sun, 11 Apr 2021 02:04:15 +0300
Subject: [PATCH] SSH communicator - Reset retries counter, sleep between
connection attempts
---
plugins/communicators/ssh/communicator.rb | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
@avoidik
avoidik / calico.default.patch
Last active October 29, 2024 07:55
calico manifest patch (vxlan on azure)
diff -rupN a/calico.yaml b/calico.yaml
--- a/calico.yaml 2021-05-05 19:02:04.519178634 +0000
+++ b/calico.yaml 2021-05-05 19:05:03.599185605 +0000
@@ -10,7 +10,7 @@ data:
# Typha is disabled.
typha_service_name: "none"
# Configure the backend to use.
- calico_backend: "bird"
+ calico_backend: "vxlan"
@avoidik
avoidik / wsl2-network.ps1
Created April 1, 2021 10:42 — forked from daehahn/wsl2-network.ps1
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
@avoidik
avoidik / pomoyka.sh
Created March 27, 2021 14:32
Download pomoyka playlists over Tor
#!/usr/bin/env bash
ROOT_URL='http://f27uk3gyl2gfu4z36eifv4ob73w6xgrcms4w4vdxzcsxsobgc766ityd.onion/trash/ttv-list'
USER_AGENT='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0'
# url;file
PLAYLISTS=(
"${ROOT_URL}/acetv.all.tag.player.m3u;/var/www/html/pomoyka/acetv.all.tag.player.m3u"
"${ROOT_URL}/ace.all.tag.player.m3u;/var/www/html/pomoyka/ace.all.tag.player.m3u"
@avoidik
avoidik / clearurls.sh
Created March 27, 2021 14:25
Create ClearURLs local repo with customized filters
#!/usr/bin/env bash
ROOT_URL='https://rules2.clearurls.xyz'
USER_AGENT='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0'
# download original filter,where to store original filter,customizations file,hash file
PLAYLISTS=(
"${ROOT_URL}/data.minify.json;/var/www/html/clearurls/data.minify.json;/var/www/html/clearurls/custom.json;/var/www/html/clearurls/rules.minify.hash"
)
@avoidik
avoidik / category.php
Last active July 18, 2022 23:05
Filter M3U playlist by group-title
<?php
if ($argc != 4)
{
echo "This script will take a source M3U playlist, filter out everything out of it based upon the title-group.\n\n";
echo "Usage: php ".basename($argv[0])." group source.m3u dest.m3u\n";
echo " php ".basename($argv[0])." kids ace.all.tag.iproxy.hls.m3u kids.m3u\n";
die(1);
}
@avoidik
avoidik / README.md
Last active January 8, 2022 17:07
Minikube - Resolve metrics-server error

How to resolve

I0314 13:56:46.590189       1 reststorage.go:93] No metrics for pod default/nginx-deployment-5dbc46bd94-wxvrf
I0314 13:57:46.598937       1 reststorage.go:140] No metrics for container nginx in pod default/nginx-deployment-559d658b74-hd4kh

Steps

Replace ClusterRole

@avoidik
avoidik / jitsi-meet-multi-server.md
Created March 8, 2021 10:26 — forked from facsiaginsa/jitsi-meet-multi-server.md
This tutorial is for jitsi-meet installation using 2 server or more. The main server will contain jitsi-meet react source code, prosody, nginx, and jicofo. The videobridge will be installed seperatelly on the second server and so on.

How to Install Jitsi Meet with Multi Server Configuration

This tutorial is for jitsi-meet installation using 2 server or more. The main server will contain jitsi-meet react source code, prosody, nginx, and jicofo. The videobridge will be installed seperatelly on the second server and so on.

Prerequisite

  1. Minimum 2 server with 1 IP Public each
  2. Ubuntu 18.04

Sudo Privileges

Before start we make sure that we will have no permission issue on the installation.

@avoidik
avoidik / cidrs-to-lists.txt
Last active February 23, 2025 19:20
Mikrotik Scripts
:foreach id in=[/ip addr find] do={
:local intInterface [/ip addr get $id interface];
:local intAddrList "$intInterface-addr";
:local intOldAddr "";
:local intCidrBlock "";
:local intCidrAddr [/ip address get [/ip address find interface=$intInterface disabled=no] address];
:local intNetAddr [/ip address get [/ip address find interface=$intInterface disabled=no] network];
:set intCidrBlock "$intNetAddr/$[:pick $intCidrAddr ([:find $intCidrAddr "/"]+1) [:len $intCidrAddr]]";
:log info "Current $intInterface CIDR is $intCidrBlock";