Skip to content

Instantly share code, notes, and snippets.

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

FMH (@gema_naranyala) naranyala

🎯
F11 - back to the context
View GitHub Profile
#!/bin/bash
DEFAULT_BROWSER="brave"
# Declare a custom array of websites
declare -A websites
websites["google"]="google.com"
websites["github"]="github.com"
websites["twitter"]="twitter.com"
# websites[""]="https://%s"
#!/bin/bash
declare -A websites
websites["ai-perplexity"]="https://www.perplexity.ai/search"
websites["ai-ms-copilot"]="https://copilot.microsoft.com/"
websites["ai-youcom"]="https://you.com/search"
websites["ai-huggingface"]="https://huggingface.co/chat"
websites["ai-claude-ai"]="https://claude.ai/chat"
websites["ai-google-bard"]="https://bard.google.com/chat"
#!/bin/bash
declare -A websites
websites["google"]="https://www.google.com"
websites["twitter"]="https://twitter.com"
# Get website names as a list
website_names=$(printf "%s\n" "${!websites[@]}")
# Use Rofi to select a website
local map = vim.api.nvim_set_keymap
local function map_numeric_keys()
local numeric_mappings = {}
for i = 1, 9 do
table.insert(numeric_mappings, {
key = tostring(i),
cmd = string.format('<cmd> lua require("harpoon.ui").nav_file(%d)<CR>', i),
desc = string.format("Harpoon Bind #%d", i),
#!/bin/bash
# INFO:
# using fzf to show tmux-window-list (active session)
# select and kill the selected-window
# Get the current tmux session
TMUX_SESSION=$(tmux display-message -p '#S')
# Get a list of windows in the current session
#!/bin/bash
# INFO:
# using fzf to show tmux-session-list
# select and kill the selected-session
# Get a list of active tmux sessions
tmux_list=$(tmux list-sessions -F "#S")
# Check if there are no active sessions
#!/bin/bash
# INFO:
# using fzf to show jump between tmux-window
# Get a list of active tmux sessions
tmux_sessions=$(tmux list-sessions -F "#S")
# Check if there are no active sessions
if [ -z "$tmux_sessions" ]; then
#!/bin/bash
# Script to switch tmux sessions using fzf
# Get a list of active tmux sessions (excluding the current session)
session_list=$(tmux list-sessions | sed -E 's/:.*$//' | grep -v "^$(tmux display-message -p '#S')\$")
# Check if there are no active sessions
if [ -z "$session_list" ]; then
echo "No other active tmux sessions found."
vim.cmd([[
autocmd VimEnter,BufWinEnter,BufNewFile,CursorMoved,BufEnter * set showtabline=0
autocmd WinEnter,FocusGained * set showtabline=0
autocmd BufLeave * set showtabline=2
]])
#!/bin/bash
# Prompt the user to choose a DNS server
echo "Choose a DNS server:"
echo "1. Cloudflare (1.1.1.1)"
echo "2. Google (8.8.8.8)"
read -p "Enter your choice (1 or 2): " choice
# Set the DNS server based on user's choice
case $choice in