Skip to content

Instantly share code, notes, and snippets.

View tsundokul's full-sized avatar
🟣
Such wow

tsundokul

🟣
Such wow
View GitHub Profile
@tsundokul
tsundokul / prereq.sh
Created April 29, 2023 16:21
Required Ubuntu packages for building Python 3.11 from source
sudo apt-get update
sudo apt-get install -y build-essential python3-dev libffi-dev \
libssl-dev zlib1g-dev sqlite3 libsqlite3-dev liblzma-dev libbz2-dev
@tsundokul
tsundokul / amd.log
Last active March 5, 2023 21:39
RX 6700 fails from hibernation
-- Boot e388ad3cde6d466c8a8a8a8188dad775 --
Mar 05 23:36:26 kali systemd-udevd[3395]: event_source: Failed to get device name: No such file or directory
Mar 05 23:38:06 kali kernel: [drm:psp_v11_0_memory_training [amdgpu]] *ERROR* send training msg failed.
Mar 05 23:38:06 kali kernel: [drm:psp_resume [amdgpu]] *ERROR* Failed to process memory training!
Mar 05 23:38:06 kali kernel: [drm:amdgpu_device_fw_loading [amdgpu]] *ERROR* resume of IP block <psp> failed -62
Mar 05 23:38:06 kali kernel: amdgpu 0000:03:00.0: amdgpu: amdgpu_device_ip_resume failed (-62).
Mar 05 23:38:06 kali kernel: amdgpu 0000:03:00.0: PM: dpm_run_callback(): pci_pm_restore+0x0/0xe0 returns -62
Mar 05 23:38:06 kali kernel: amdgpu 0000:03:00.0: PM: failed to restore async: error -62
Mar 05 23:38:06 kali kernel: amdgpu: Move buffer fallback to memcpy unavailable
Mar 05 23:38:06 kali kernel: [drm:amdgpu_cs_ioctl [amdgpu]] *ERROR* Failed to process the buffer list -19!
@tsundokul
tsundokul / dump.groovy
Created May 19, 2022 08:14
Junkins Dump Stored Creds
// Go to JUNKINS_URL/script
def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(
com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.class,
Jenkins.instance,
null,
null
);
for (c in creds) {
println( ( c.properties.privateKeySource ? "ID: " + c.id + ", UserName: " + c.username + ", Private Key: " + c.getPrivateKey() : ""))
}
@tsundokul
tsundokul / update_keyring.sh
Last active January 20, 2023 15:37
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead
# Remove legacy keyring
sudo rm /etc/apt/trusted.gpg
# Run apt update to get the deprecated gpg key hashes printed
sudo apt update
# Err:13 https://deb.torproject.org/torproject.org stretch InRelease
# The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 74A941BA219EC810
# replace [HASH] eg. F57D4F59BD3DF454
# [NAME] must be unique eg. tor.gpg, sublime.gpg etc
cd /tmp
@tsundokul
tsundokul / disable_cabs.rb
Last active August 22, 2021 15:46
Amplitube 5 disable cabinets in all presets (Windows)
#!/usr/bin/env ruby
require 'nokogiri'
def get_presets(dir = default_dir)
Dir.glob File.join(dir, '**/*.at{5,4}p')
end
def get_cab_elements(preset_path)
doc = Nokogiri.XML IO.read(preset_path)
@tsundokul
tsundokul / homebank.js
Created August 11, 2021 18:49
ING Homebank keep-alive (TamperMonkey)
// ==UserScript==
// @name Homebank keep-alive
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.homebank.ro/hb/hb/*
// @icon https://www.google.com/s2/favicons?domain=w3schools.com
// @grant none
// ==/UserScript==
@tsundokul
tsundokul / imap-search
Created June 4, 2021 13:48 — forked from martinrusev/imap-search
IMAP Search criteria
@tsundokul
tsundokul / add_wg_peer.sh
Created March 4, 2021 10:49
Add Wireguard user without restarting the service
#!/bin/bash
# call as sudo ./script <key> <ip> <mask> [iface]
iface=${4:-wg0}
wg set peer ${1} allowed-ips=${2}/${3}
wg-quick save ${iface}
ip route add ${2} ${iface}
@tsundokul
tsundokul / fonts.conf
Created February 16, 2021 22:55 — forked from SohamG/fonts.conf
Fix emoji in Linux and get color emoji in Discord! Place this fontconfig file in ~/.config/fontconfig/fonts.conf
<?xml version="1.0"?><!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- REQUIRES Noto fonts (along with Noto Color Emoji)
run `fc-list | grep -i -e "noto sans" -e "noto serif" -e "noto color emoji"` to confirm
-->
<alias>
<!-- Change the string in the family tag to whatever font -->
<family>serif</family>
<prefer><family>Noto Serif</family></prefer>
@tsundokul
tsundokul / vmware_recompile.sh
Created November 7, 2020 12:28
VMWare Fix for: A compatible version of gcc was not found
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
cd /usr/lib/vmware/modules/source
tar xvf vmnet.tar
cd vmnet-only
make