Skip to content

Instantly share code, notes, and snippets.

View sub314xxl's full-sized avatar

Konstantin Mokhnatkin sub314xxl

  • Moscow, Russian Federation
View GitHub Profile
@sub314xxl
sub314xxl / gsoc24-jitsi-log-analyser.md
Created October 25, 2024 08:49 — forked from ilaydadastan/gsoc24-jitsi-log-analyser.md
This file is for the final submission of the Jitsi Meet Log Analyser project within the scope of Google Summer of Code 2024.
@sub314xxl
sub314xxl / install.js
Created June 22, 2024 14:34 — forked from ArtemAvramenko/install.js
Fastest install script for npm 7.0+, speed up npm ci
// Fastest install script for npm 7.0+
// usage: node install
const fs = require('fs');
const readLockFile = path => {
if (fs.existsSync(path)) {
const text = fs.readFileSync(path, { encoding:'utf8', flag:'r' });
const lockFile = JSON.parse(text);
delete lockFile.dependencies;

Audio Mod Troubleshooting Guide

Search the XDA thread

This should always be your first step. More than likely, your question has already been answered...multiple times

Logs

If you make a post stating a problem without any logs, nobody can help you and will likely ignore it (at least I will)

  • Get a full logcat. If using adb, use adb logcat -d > log.txt
    • This should be taken after attempting to open the app
  • Get an audio dumpsys:
@sub314xxl
sub314xxl / kubectl.md
Created January 31, 2024 19:39 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@sub314xxl
sub314xxl / optimal_mtu.md
Created January 2, 2024 13:00 — forked from nitred/optimal_mtu.md
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@sub314xxl
sub314xxl / kubedf
Created December 26, 2023 08:10 — forked from redmcg/kubedf
Bash script to show k8s PVC usage
#!/usr/bin/env bash
NODESAPI=/api/v1/nodes
function getNodes() {
kubectl get --raw $NODESAPI | jq -r '.items[].metadata.name'
}
function getPVCs() {
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\
@sub314xxl
sub314xxl / systemd_service_hardening.md
Created October 14, 2023 18:14 — forked from ageis/systemd_service_hardening.md
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
DevicePolicy=closed
ProtectSystem=strict
@sub314xxl
sub314xxl / install-discord.bash
Created June 21, 2023 15:14 — forked from lnoering/install-discord.bash
Install discord (for the .tar.gz)
#!/usr/bin/env bash
cd ~/
mkdir -p ~/.local/bin
wget "https://discordapp.com/api/download/canary?platform=linux&format=tar.gz" -O discord.tar.gz
tar -xvf discord.tar.gz -C ~/.local/bin
sudo ln -s ~/.local/bin/DiscordCanary/discord.png /usr/share/icons/discord.png
sudo ln -s ~/.local/bin/DiscordCanary/DiscordCanary /usr/bin
wget https://gist.githubusercontent.com/AdrianKoshka/a12ca0bfe2f334a9f208aff72f8738c3/raw/9d606ad7ce7cc1dd23f6a99993e2396540538a02/discord.desktop -O discord.desktop
mkdir -p ~/.local/share/applications/
mv ~/discord.desktop ~/.local/share/applications/
@sub314xxl
sub314xxl / bash-cheatsheet.sh
Created May 29, 2023 12:39 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@sub314xxl
sub314xxl / .bashrc
Created May 29, 2023 10:28 — forked from michaelklapper/.bashrc
Color up your bash history with the date time information of called commands.
MY_BASH_BLUE="\033[0;34m" #Blue
MY_BASH_NOCOLOR="\033[0m"
HISTTIMEFORMAT=`echo -e ${MY_BASH_BLUE}[%F %T] $MY_BASH_NOCOLOR `
HISTSIZE=20000
HISTFILESIZE=20000