Skip to content

Instantly share code, notes, and snippets.

View ejangi's full-sized avatar
😎
Totally addicted to Docker.

James ejangi

😎
Totally addicted to Docker.
View GitHub Profile
@ejangi
ejangi / RepoMapCommand.php
Last active August 6, 2026 23:42
Symfony AST extraction command: src/Command/RepoMapCommand.php
<?php
/**
* REQUIRES `composer require nikic/php-parser`
*
* Add the following to your AGENTS.md file:
*
* ## Pre-Task Context Gathering
*
* Before proposing or generating any code changes, **always** run the Repository Map command to inspect existing interfaces, services, entities, and signatures in the codebase:
*
@ejangi
ejangi / oscmix-gui.desktop
Created June 18, 2026 23:12
Gnome Desktop launcher for OSC Mix`
[Desktop Entry]
Name=TotalMix OSCMix GUI
Comment=Launch OSCMix graphical user interface for RME Fireface UCX II, ensuring background service is running.
Exec=/bin/bash -c "${HOME}/.local/bin/oscmix_launcher.sh"
Icon=applications-audio # You can change this to a more specific icon if you have one, or find a suitable one in your system's icon themes (e.g., audio-volume-high)
Terminal=false
Type=Application
Categories=AudioVideo;Utility;
StartupNotify=true
@ejangi
ejangi / antigravity.desktop
Created June 18, 2026 23:11
Gnome Desktop launcher for Antigravity
[Desktop Entry]
Version=1.0
Type=Application
Name=Antigravity 2.0
Comment=AI Agent Command Center
Exec=/home/ejangi/.local/Antigravity-x64/antigravity %U
Icon=/home/ejangi/.local/antigravity-icons/antigravity.png
Terminal=false
Categories=Development;IDE;
MimeType=x-scheme-handler/antigravity;
@ejangi
ejangi / oscmix-launcher.sh
Created February 2, 2026 21:26
A launcher script to run OSCMIX with logging and alsarawio piped in correctly
#!/bin/bash
# Define the base directory where your oscmix installation resides.
# This assumes it's in your home directory under 'Sites/oscmix'.
OSCMIX_DIR="${HOME}/Sites/oscmix"
# Define a log file for the alsarawio background process.
# This will capture any output or errors from alsarawio.
LOG_FILE="${HOME}/.local/share/oscmix/alsarawio.log"
@ejangi
ejangi / fix-amd-gpu-sleep-issue.md
Created October 30, 2025 01:43
AMD GPUs often don't like KVMs. To fix this we can turn on the GPU power management using GRUB.

Add the Kernel Parameter

Let's tell the amdgpu driver to disable its runtime power management, which is the component that's failing to resume.

  1. Open a terminal and edit your GRUB config:
sudo nano /etc/default/grub
  1. Find the line GRUB_CMDLINE_LINUX_DEFAULT=.
@ejangi
ejangi / Ubuntu-undo-auto-maximize.sh
Created October 29, 2025 01:40
Stop Ubuntu from auto maximizing windows when opened
gsettings set org.gnome.mutter auto-maximize false
@ejangi
ejangi / yabridgectl-sync-sh
Created July 1, 2025 05:59
When installing windows VSTs on Linux, you need to sync them with linux using Yabridge
yabridgectl sync --prune
# Once you have run `rclone config` to create the iclouddrive connection:
rclone copy iclouddrive: iCloud\ Drive/ --progress --verbose --transfers 1 --ignore-size
# If you have a file of paths to include (prefix "+ ") or exclude (prefix "- ") then you can use:
# rclone copy iclouddrive: iCloud\ Drive/ --progress --verbose --transfers 1 --ignore-size --filter-from ~/.config/rclone/filters.txt
const functions = require('@google-cloud/functions-framework');
const express = require('express');
const app = express();
// GET /myFunction
app.get('/', async (req, res) => {
res.status(200).send('Default route');
});
// GET /myFunction/other
package main
import (
"fmt"
"github.com/pkg/errors"
)
// Custom Error Type
type InvalidInputError struct {
Field string