Skip to content

Instantly share code, notes, and snippets.

View isDipesh's full-sized avatar

Dipesh Acharya isDipesh

View GitHub Profile
@isDipesh
isDipesh / cursor-arch.sh
Created February 7, 2026 16:20
Cursor IDE Installation on Arch Linux
# Install Cursor AI IDE
mkdir -p ~/apps
curl -L https://api2.cursor.sh/updates/download/golden/linux-x64/cursor/2.4 -o ~/apps/cursor.AppImage
chmod +x ~/apps/cursor.AppImage
curl -L https://mintlify.s3.us-west-1.amazonaws.com/cursor/images/logo/app-logo.svg -o ~/apps/cursor.svg
mkdir -p ~/.local/share/applications
cat > ~/.local/share/applications/cursor.desktop <<EOL
[Desktop Entry]
Name=Cursor IDE
Exec=$HOME/apps/cursor.AppImage
@isDipesh
isDipesh / sqlite-to-cloudflare-d1-import.md
Created December 22, 2025 06:25
Importing SQLite to Cloudflare D1

Importing SQLite to Cloudflare D1

Dump SQLite to Sql

sqlite3 -escape off server/db/db.sqlite .dump > db.sql

Escape off prevents unistr in newer versions of sqlite, which D1 does not support.

Cleanup SQL Dump

  • Remove BEGIN TRANSACTION; and COMMIT; from the file
@isDipesh
isDipesh / drizzle-pagination.ts
Last active December 18, 2025 13:06
Drizzle Pagination Util
import { count } from 'drizzle-orm'
const DEFAULT_PAGE_SIZE = 20
const MAX_PAGE_SIZE = 200
type PaginateableQuery<TQuery> = {
limit: (limit: number | undefined) => PaginateableQuery<TQuery>
offset: (offset: number | undefined) => PaginateableQuery<TQuery>
orderBy: (orderBy: string) => PaginateableQuery<TQuery>
}
@isDipesh
isDipesh / drizzle-pagination-nuxt-nitro.ts
Last active December 18, 2025 13:06
Drizzle Query Pagination Util for Nitro/Nuxt
import type { H3Event } from 'h3'
import { count } from 'drizzle-orm'
const DEFAULT_PAGE_SIZE = 20
const MAX_PAGE_SIZE = 200
type PaginateableQuery<TQuery> = {
limit: (limit: number | undefined) => PaginateableQuery<TQuery>
offset: (offset: number | undefined) => PaginateableQuery<TQuery>
orderBy: (orderBy: string) => PaginateableQuery<TQuery>
@isDipesh
isDipesh / pg-upgrade.sh
Last active November 24, 2025 10:19
Postgres cluster upgrade for new Postgres version on Arch linux
# If postgis is used
yay -S postgis-old-upgrade
sudo su
systemctl stop postgresql
mv /var/lib/postgres/data /var/lib/postgres/olddata
mkdir /var/lib/postgres/data /var/lib/postgres/tmp
chown postgres:postgres /var/lib/postgres/data /var/lib/postgres/tmp
sudo su postgres
cd /var/lib/postgres/tmp
# Use --no-data-checksums if pg was initialized without page checksums
@isDipesh
isDipesh / install-chrome-shortcut.sh
Created August 3, 2025 05:44
Chrome Shortcut App for Gnome to use X11
sudo tee /usr/share/applications/google-chrome.desktop > /dev/null << 'EOF'
[Desktop Entry]
Version=1.0
Name=Google Chrome
GenericName=Web Browser
Comment=Access the Internet
StartupWMClass=Google-chrome
Exec=/usr/bin/google-chrome-stable --ozone-platform=x11 %U
StartupNotify=true
Terminal=false
@isDipesh
isDipesh / setup-devanagari-fonts.sh
Created April 23, 2025 08:10
Setup Devanagari Fonts on (Arch) Linux
#!/bin/bash
set -e
echo "📦 Installing recommended Devanagari fonts..."
sudo pacman -S --needed noto-fonts noto-fonts-cjk noto-fonts-extra --noconfirm
echo "🛠 Creating Fontconfig override for Hindi and Nepali..."
mkdir -p ~/.config/fontconfig
@isDipesh
isDipesh / tray-app-indicators-gnome.sh
Created January 21, 2025 07:44
Tray Icons (App Indicators) extension for Gnome on Arch
sudo pacman -S meson jq
git clone https://github.com/ubuntu/gnome-shell-extension-appindicator.git
meson gnome-shell-extension-appindicator /tmp/g-s-appindicators-build
ninja -C /tmp/g-s-appindicators-build install
gnome-extensions enable [email protected]
@isDipesh
isDipesh / guake.md
Created January 21, 2025 06:22
Guake Configuration

Install

sudo pacman -S guake

Enable Toggle

Open Settings app
Keyboard => Keyboard Shortcuts => View and Customize Shortcuts => Custom Shortcuts => +:
Name: Guake Toggle

@isDipesh
isDipesh / dev.sh
Last active February 11, 2026 11:09
Development Environment Setup on Arch Linux
# sudo without password
echo "$(whoami) ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/100-$(whoami) && sudo chmod 0440 /etc/sudoers.d/100-$(whoami)
# Add essential packages
sudo pacman -S yay vim meson jq
sudo pamac install base-devel
# Add ddterm
sudo tee -a /etc/pacman.conf <<EOF