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 / create-sentry-projects.ts
Created January 21, 2025 16:10 — forked from tichopad/create-sentry-projects.ts
Bulk create Sentry Projects
import fs from 'fs/promises';
const SENTRY_API_KEY = 'enterapikeyhere';
const ORG_SLUG = 'enterorgslughere';
const TEAM_SLUG = 'enterteamnamehere';
const fetchSentry = (
path: string,
method: 'GET' | 'POST' | 'PUT' = 'GET',
body?: Record<string, any>,
@sub314xxl
sub314xxl / Dockerfile
Created January 16, 2025 16:38 — forked from wilcorrea/Dockerfile
Quasar with docker
# tevun/quasar
FROM node:alpine
RUN apk --update add openssh-client git
RUN npm install --global \
@vue/[email protected] && \
@vue/[email protected] \
@quasar/[email protected]\
[email protected]
@sub314xxl
sub314xxl / get-docker-image-tag-by-sha.sh
Created January 13, 2025 16:38 — forked from achetronic/get-docker-image-tag-by-sha.sh
Find the tag of a Docker image having only the SHA256
#!/bin/bash
SHA256_HASH="5bb4faffc8b35e2702b2ffa78e982b979d7b66db29bd55b0c58de8fa745df661"
for i in {1..1000}
do
echo "Looking into page: $i"
curl "https://registry.hub.docker.com/v2/repositories/apache/superset/tags/?page=$i" \
| jq '.results[] | select(.["images"][]["digest"] == "sha256:'${SHA256_HASH}'")'
@sub314xxl
sub314xxl / clean.sh
Created December 27, 2024 02:15 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
@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")) | '\