Skip to content

Instantly share code, notes, and snippets.

@vadikgo
vadikgo / LUKS_and_TPM2_with_Fedora.md
Last active September 7, 2023 10:27 — forked from jdoss/LUKS_and_TPM2_with_Fedora.md
Decrypt LUKS volumes with a TPM on Fedora 35+

Decrypt LUKS volumes with a TPM on Fedora 35+

This guide allows you to use the TPM on your computer to decrypt your LUKS encrypted volumes. If you are worried about a cold boot attack on your hardware please DO NOT use this guide with your root volume!

Preflight Checks

Verify that you have a TPM in your computer:

# systemd-cryptenroll --tpm2-device=list
PATH DEVICE DRIVER
@vadikgo
vadikgo / remap.md
Last active May 2, 2024 13:02
Remap HHKB Pro Eject key to Media Play/Pause

Remap HHKB Pro Eject key to Media Play/Pause

Run in a terminal

hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0xC000000B8,"HIDKeyboardModifierMappingDst":0xC000000CD}]}'

Add remap on startup

@vadikgo
vadikgo / ffmpeg.md
Created April 25, 2021 08:07 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
@vadikgo
vadikgo / guide.text
Created April 11, 2021 17:47 — forked from sled/guide.text
Guid to cross compile transmission 2.82 for Western Digital MyCloud
########################################################
## CROSS COMPILING TRANSMISSION 2.82 FOR WD MY CLOUD ##
########################################################
This is a guide to compile transmission 2.82 for the WD MyCloud 2/3/4 TB.
Because I didn't want to install the build tools and dependencies on my NAS I chose to
setup a cross-compiler toolchain on my x86_64 Ubuntu 12.04 machine and create a .deb package
that can be installed on the NAS. Furthermore the cross compiler can be used to compile anything for the My Cloud (printer drivers, etc.)
@vadikgo
vadikgo / fedora.citrix.workspace.sh
Created February 2, 2021 07:27 — forked from Thermionix/fedora.citrix.workspace.sh
Install Citrix Workspace App on Fedora 32
#!/bin/sh
#Install Citrix Workspace App on Fedora 32
#Download Client From https://www.citrix.com/en-au/downloads/workspace-app/linux/workspace-app-for-linux-latest.html
sudo dnf install -y ICAClientWeb-rhel-20.04.0.21-0.x86_64.rpm
sudo dnf install -y compat-openssl10.x86_64
# Update libcrypto reference in desktop file
sudo sed -i '/Exec=/d' /usr/share/applications/wfica.desktop
@vadikgo
vadikgo / proxy.pac
Created November 18, 2020 15:45
safari proxy pac
function FindProxyForURL(url, host) {
if (dnsDomainIs(host, ".vtb") || dnsDomainIs(host, ".vtb.ru") ||
shExpMatch(host, "10.*") ||
shExpMatch(host, ".*\.vtb.*")) {
return "SOCKS 127.0.0.1:9050; SOCKS5 127.0.0.1:9050;";
}
return "DIRECT";
}
@vadikgo
vadikgo / goprocs.go
Created August 30, 2020 12:08
test go routines parallel run
package main
import (
"fmt"
"sync"
"time"
)
func makeRange(min, max int) []int {
a := make([]int, max-min+1)
@vadikgo
vadikgo / nodes.groovy
Created July 17, 2020 07:26
List Jenkins nodes with labels
def hostNames(label) {
def nodes = []
Jenkins.instance.computers.each { c ->
if (c.node.labelString.contains(label)) {
nodes.add(c.node.selfLabel.name)
}
}
return nodes
}
@vadikgo
vadikgo / disableSSL.groovy
Created March 6, 2020 11:21 — forked from thomastaylor312/disableSSL.groovy
Disable SSL validation in Groovy
def nullTrustManager = [
checkClientTrusted: { chain, authType -> },
checkServerTrusted: { chain, authType -> },
getAcceptedIssuers: { null }
]
def nullHostnameVerifier = [
verify: { hostname, session -> true }
]
@vadikgo
vadikgo / gist:aa3cfa937ee8c3f6831ac821375cfe90
Created February 26, 2020 14:00
Install Eclipse Memory Analyzer on Mac OS Catalina
brew cask install adoptopenjdk/openjdk/adoptopenjdk8
brew cask install mat