Skip to content

Instantly share code, notes, and snippets.

View naranyala's full-sized avatar
🎯
F11 - back to the context

fmh / regular detach naranyala

🎯
F11 - back to the context
View GitHub Profile
@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 2, 2025 14:28
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 = [
@Vertecedoc4545
Vertecedoc4545 / Hyprland-Ubuntu.md
Last active June 12, 2025 06:01
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
@benlubas
benlubas / telescope_action_harpoon_mark.lua
Last active April 27, 2024 12:21
Harpoon mark files from telescope picker
M = {}
local telescope_utils = require("telescope.actions.utils")
local utils = require("telescope.actions.utils")
local actions = require("telescope.actions")
M.mark_file = function(tb)
actions.drop_all(tb)
actions.add_selection(tb)
telescope_utils.map_selections(tb, function(selection)
@LintaoAmons
LintaoAmons / .tmux.conf
Created October 8, 2022 09:50
Popup terminal with tmux
# ... your other config
bind-key -n M-3 run-shell 'toggle-tmux-popup'
# you can switch `M-3` to any keybindings you like.
@mmozeiko
mmozeiko / !README.md
Last active June 28, 2025 13:26
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for native desktop app development.

Run py.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.40.33807 and v10.0.26100.0.

You can list available versions with py.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe first run setup_TARGET.bat - after that PATH/INCLUDE/LIB env variables will be updated to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).