Skip to content

Instantly share code, notes, and snippets.

@arthurmde
arthurmde / install-cursor-sh
Created July 11, 2025 13:58 — forked from tatosjb/install-cursor-sh
install-cursor.sh
#!/bin/bash
# To install on ubuntu
# curl -fsSL https://gist.github.com/tatosjb/0ca8551406499d52d449936964e9c1d6/raw/28459ee07900ef76081c9e276cd94d707bed73a9/install-cursor-sh | bash
installCursor() {
if ! [ -f /opt/cursor.appimage ]; then
echo "Installing Cursor AI IDE..."
mkdir -p "$HOME/Applications/cursor"
# URLs for Cursor AppImage and Icon
@arthurmde
arthurmde / postgres_queries_and_commands.sql
Last active April 9, 2024 13:41 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show long-running queries (greater than 5 minutes)
SELECT
pid,
now() - pg_stat_activity.query_start AS duration,