Skip to content

Instantly share code, notes, and snippets.

View naranyala's full-sized avatar

naranyala naranyala

View GitHub Profile
#!/bin/sh
# Minimal XFCE desktop setup for Alpine Linux with error handling
set -euo pipefail
# Function to print messages
log() {
echo "[INFO] $*"
}
#!/bin/bash
# Install MSYS2 if missing, then install GNU utilities and expose them in Git Bash
# Includes silent installer run, path conversion, error handling, and visible linking progress
set -euo pipefail
MSYS_DIR="/c/msys64"
MSYS_BIN="$MSYS_DIR/usr/bin"
INSTALLER_URL="https://github.com/msys2/msys2-installer/releases/latest/download/msys2-x86_64-latest.exe"
INSTALLER_PATH="/c/Users/$(whoami)/Downloads/msys2-installer.exe"
@naranyala
naranyala / expose-winsysexe-gitbash.sh
Created January 1, 2026 19:33
expose every windows system executable for "git bash" on windows machine
#!/bin/bash
# Script to expose Windows executables in Git Bash with progress indicator
WIN_DIRS=(
"/c/Windows"
"/c/Windows/System32"
"/c/Windows/SysWOW64"
"/c/Program Files"
"/c/Program Files (x86)"
)
#!/bin/bash
# Switch Fedora to KDE Plasma Desktop using dnf5 with --skip-unavailable
# Includes backup of current display manager config
set -e
echo "Updating system..."
dnf5 -y upgrade --skip-unavailable
echo "Installing KDE Plasma Desktop..."
@naranyala
naranyala / install-tauri-deps.sh
Created August 31, 2025 17:05
fix tauri dependencies packages on various linux and run your first tauri app
#!/usr/bin/env bash
set -euo pipefail
log() { echo -e "\033[1;32m[INFO]\033[0m $*"; }
err() { echo -e "\033[1;31m[ERROR]\033[0m $*" >&2; }
detect_distro() {
if command -v dnf &>/dev/null; then echo "fedora"
elif command -v apt &>/dev/null; then echo "debian"
elif command -v pacman &>/dev/null; then echo "arch"
@naranyala
naranyala / install-zsh-with-plugins.sh
Created August 31, 2025 03:02
easy to install z shell (zsh) with plugins; try to "chmod +x install-zsh-with-plugins.sh" and execute
#!/usr/bin/env bash
set -euo pipefail
### CONFIG ###
LOG_FILE="/tmp/setup-zsh.log"
ZSHRC="$HOME/.zshrc"
ZSHRC_BACKUP="$HOME/.zshrc.backup.$(date '+%Y%m%d_%H%M%S')"
OH_MY_ZSH_DIR="$HOME/.oh-my-zsh"
ZSH_CUSTOM="${OH_MY_ZSH_DIR}/custom"
@naranyala
naranyala / bootstrap_raylib.c
Created August 26, 2025 15:27
easy setup raylib with nob.h
// gcc bootstrap_raylib.c -o bootstrap_raylib && ./bootstrap_raylib --project-path ./demo
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#ifdef _WIN32
#include <direct.h>
@naranyala
naranyala / bootstrap.c
Last active September 11, 2025 12:38
bootstrap your c-project faster with nob.h
// gcc bootstrap.c -o bootstrap && ./bootstrap --project-path ./sample
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#ifdef _WIN32
#include <direct.h>
@naranyala
naranyala / nobup.sh
Last active August 21, 2025 03:38
get the latest nob.h, the C's build system by tsoding (https://github.com/tsoding/nob.h)
#!/bin/sh
TARGET="nob.h"
BACKUP="${TARGET}.backup"
URL="https://raw.githubusercontent.com/tsoding/nob.h/main/nob.h"
# Function to extract version from nob.h
extract_version() {
grep -m1 'nob - v' "$1" | sed -E 's|/\* nob - (v[0-9]+\.[0-9]+\.[0-9]+).*|\1|'
}
@naranyala
naranyala / dashboard.html
Created August 10, 2025 03:15
the only one dashboard layout you need, of course mobile-friendly
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minimal Dashboard</title>
<link rel="stylesheet" href="https://unpkg.com/open-props" />
<link rel="stylesheet" href="https://unpkg.com/open-props/normalize.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">