Skip to content

Instantly share code, notes, and snippets.

View naranyala's full-sized avatar

naranyala naranyala

View GitHub Profile
@naranyala
naranyala / index.html
Last active July 19, 2025 04:25
your single-file static blog template with code-highlight and mermaid.js support (mobile-friendly too!)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Tab-Based Blog with Mermaid</title>
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/prism.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism-tomorrow.min.css" rel="stylesheet"/>
#!/usr/bin/env bash
set -euo pipefail
# 🗃️ Ensure required directories exist
mkdir -p ~/.local/share/fonts ~/.config/fontconfig/conf.d
# 🎨 Install emoji font
echo "📥 Installing Noto Color Emoji font..."
sudo apt update
sudo apt install -y fonts-noto-color-emoji
#!/usr/bin/env bash
set -euo pipefail
# ✋ Require all arguments
if [[ $# -lt 5 ]]; then
echo "Usage:"
echo " $0 <AppName> <ExecCommand> <IconSourcePath> <WorkingDir> <Comment>"
echo ""
echo "Example:"
echo " $0 \"TLauncher\" \"/usr/games/tlauncher/run.sh\" \"~/Downloads/tlauncher.png\" \"/usr/games/tlauncher\" \"Run client for the games\""
@naranyala
naranyala / make-android-studio-shortcut-linux.sh
Created July 18, 2025 06:55
make android-studio linux globally available, and can be pinned on system launcher
#!/usr/bin/env bash
set -euo pipefail
# ✅ Input validation
if [[ $# -ne 2 ]]; then
echo "Usage: $0 /path/to/android-studio/bin/studio.sh /path/to/icon.png"
exit 1
fi
ANDROID_EXEC="$1"
<!DOCTYPE html>
<html>
<head>
<title>Kotlin/Native Guide</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://cdn.jsdelivr.net/npm/mithril@2.2.2/mithril.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/goober@2.1.13/dist/goober.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-kotlin.min.js"></script>
@naranyala
naranyala / install-zsh-starship.sh
Created July 17, 2025 09:24
easy installation for zsh (z shell) and starship terminal
#!/usr/bin/env bash
set -e
# Helper to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
echo "🔍 Checking dependencies..."
@naranyala
naranyala / install-homebrew-on-linux.sh
Last active July 17, 2025 03:20
after installation, reload the current shell (like execute bash, zsh, etc.)
#!/bin/bash
# --- Configuration ---
# Set the desired installation path for Homebrew.
# By default, Homebrew installs to /home/linuxbrew/.linuxbrew
# You can change this if you have specific reasons, but be aware of permissions.
# HOMEBREW_PREFIX="/usr/local" # Example: installing to /usr/local, requires sudo for setup
HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" # Recommended default
# --- Pre-installation Checks ---
import kotlinx.cinterop.*
import raylib.*
import kotlin.random.Random
@OptIn(ExperimentalForeignApi::class)
object Colors {
val BLACK = cValue<Color> { r = 0u; g = 0u; b = 0u; a = 255u }
val WHITE = cValue<Color> { r = 255u; g = 255u; b = 255u; a = 255u }
val GRAY = cValue<Color> { r = 187u; g = 173u; b = 160u; a = 255u }
val DARK_GRAY = cValue<Color> { r = 119u; g = 110u; b = 101u; a = 255u }
@naranyala
naranyala / init.lua
Last active July 17, 2025 09:25
the only one single-file neovim lua configuration you need
-- ~/.config/nvim/init.lua
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath
})
end
vim.opt.runtimepath:prepend(lazypath)
@naranyala
naranyala / install-xfce-plugins.sh
Created July 10, 2025 09:33
complete your missing XFCE plugins/applets
#!/bin/bash
# List of commonly used XFCE plugins/applets
plugins=(
xfce4-whiskermenu-plugin # Modern application menu
xfce4-battery-plugin # Battery monitor
xfce4-weather-plugin # Weather display
xfce4-netload-plugin # Network load monitor
xfce4-cpugraph-plugin # CPU usage graph
xfce4-diskperf-plugin # Disk performance monitor