Skip to content

Instantly share code, notes, and snippets.

View alexmozaidze's full-sized avatar

Alexei Mozaidze alexmozaidze

View GitHub Profile
@alexmozaidze
alexmozaidze / gpu-average-usage
Last active January 23, 2026 17:20
Shell script for checking GPU's average usage
#!/usr/bin/env bash
is_number() {
[[ $1 =~ ^([0-9]+|[0-9]+\.[0-9]*|\.[0-9]+)$ ]]
}
is_integer() {
[[ $1 =~ ^[0-9]+$ ]]
}
// Discovering the path of JVM (if the server's `java` executable isn't the right version)
import java.io.File;
public class HackyLs {
public static void main(String[] args) {
// Input the directory you want to list here
String jvmDirectoryPath = "/opt/";
File jvmDir = new File(jvmDirectoryPath);
@alexmozaidze
alexmozaidze / go.snippets
Last active January 16, 2024 05:44
Go error handling is ez
snippet ife
if err != nil {
${1:panic(${0:err})}
}