Skip to content

Instantly share code, notes, and snippets.

View naranyala's full-sized avatar

naranyala naranyala

View GitHub Profile
@naranyala
naranyala / make-dotdesktop-for-nixpkgs.sh
Last active August 6, 2025 15:18
in context nix packages outside nixos, this script will make the packages have global ".desktop", making it globally available (cli and gui executable); to make every nix packages available in terminal (bash/zsh/etc) use this script: https://gist.github.com/naranyala/2203f889a3cb89c5cfe4599788bea915
#!/usr/bin/env bash
set -euo pipefail
# chmod +x make-dotdesktop-for-nixpkgs.sh
STORE_DIR="/nix/store"
DESKTOP_DIR="$HOME/.local/share/applications"
ICON_DIR="$HOME/.local/share/icons"
LOG_FILE="$HOME/nix-desktopify.log"
@naranyala
naranyala / make-global-symlinks-nixpkgs.sh
Last active August 6, 2025 16:27
the modern package manager for all linux distro, use `nix-shell -p <pkgname>`, then execute this script; for gui specific package use this script to create global shortcuts: https://gist.github.com/naranyala/312271a325d3c4fbd5fe33e07045cf7c
@naranyala
naranyala / make-snap-apps-visible.sh
Created July 2, 2025 08:39
fix your hidden snap packages, make it visible globally, like inside launcher
#!/usr/bin/bash
# make-snap-apps-visible.sh
sudo cp /var/lib/snapd/desktop/applications/*.desktop /usr/share/applications/
echo "[DONE] all snap packages visible!"
@iamnolanhu
iamnolanhu / CHATGPT VERSION (GPT-4 | GPT-4.1)
Created June 18, 2025 13:39
REALITY FILTER — A LIGHTWEIGHT TOOL TO REDUCE LLM FICTION WITHOUT PROMISING PERFECTION
✅ REALITY FILTER — CHATGPT
• Never present generated, inferred, speculated, or deduced content as fact.
• If you cannot verify something directly, say:
- “I cannot verify this.”
- “I do not have access to that information.”
- “My knowledge base does not contain that.”
• Label unverified content at the start of a sentence:
- [Inference] [Speculation] [Unverified]
• Ask for clarification if information is missing. Do not guess or fill gaps.
@naranyala
naranyala / snake.v
Created April 11, 2025 10:12
snake game in v (vlang)
import gg
import gx
import math
import rand
import sokol.audio
import os.asset
import sokol.sgl
const designed_width = 600
const designed_height = 800
@jwbee
jwbee / jq.md
Last active July 15, 2025 12:12
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is

@naranyala
naranyala / clone-repo-with-username.py
Last active March 26, 2025 04:21
clone-repo-with-username.py
import os
import re
import subprocess
import sys
from pathlib import Path
def clone_repo(repo_url, target_path="."):
# Define patterns for GitHub, GitLab, and Codeberg URLs
# Support both HTTPS and SSH-style URLs
patterns = [
@lidgnulinux
lidgnulinux / INSTALL.md
Last active September 4, 2025 21:15
Install Cosmic Desktop for Ubuntu, Debian Sid, and Alt Linux.

INSTALLATION GUIDE

Download packages

We borrow rpm packages from fedora 41, because we won't build all components ourselves. Download all packages using wget !

$ wget -ci packages.txt
@Vertecedoc4545
Vertecedoc4545 / Hyprland-Ubuntu.md
Last active August 30, 2025 04:46
Ubuntu 23.04 Build and Install instructions for Hyprland

Building on Ubuntu 23.04

You have 2 options, use the script descrived bellow or follow the instrutions

script in this gist if you want the source code

wget https://gist.githubusercontent.com/Vertecedoc4545/6e54487f07a1888b656b656c0cdd9764/raw/2c5e8ccb428fc331307e2f653cab88174c051310/build-ubuntu-23.sh
chmod +x build-ubuntu-23.sh
./build-ubuntu-23.sh