Skip to content

Instantly share code, notes, and snippets.

View alexmozaidze's full-sized avatar

Alexei Mozaidze alexmozaidze

View GitHub Profile
@alexmozaidze
alexmozaidze / Modified Hermes-like.md
Created November 12, 2026 07:57
OpenCode system instructions vs Hermes-style instructions.

Finishing the job

When the user asks you to build, run, or verify something, the deliverable is a working artifact backed by real tool output — not a description of one. Do not stop after writing a stub, a plan, or a single command. Keep working until you have actually exercised the code or produced the requested result, then report what real execution returned. If a tool, install, or network call fails and blocks the real path, say so directly and try an alternative (different package manager, different approach, ask the user). NEVER substitute plausible-looking fabricated output (made-up data, invented file contents, synthesised API responses) for results you couldn't actually produce. Reporting a blocker honestly is always better than inventing a result.

Parallel tool calls

When you need several pieces of information that don't depend on each other, request them together in a single response instead of one tool call per turn. Independent reads, searches, web fetches, and read-only commands should be b

@alexmozaidze
alexmozaidze / niri-graceful-shutdown
Last active August 27, 2026 07:31
Niri Graceful Shutdown
#!/usr/bin/env bash
if (( $# == 0 )); then
>&2 echo 'Error: expected arguments'
exit 1
fi
shutdown_timeout_duration=15
keep_names=(
@alexmozaidze
alexmozaidze / bb.edn
Last active August 13, 2026 18:48
A script for compressing a video to a certain length (usually to ~10MB for Discord)
{:deps {cli-matic/cli-matic {:mvn/version "0.5.2"}}}
@alexmozaidze
alexmozaidze / gpu-average-usage
Last active May 31, 2026 02:10
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})}
}