Skip to content

Instantly share code, notes, and snippets.

@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 10, 2024 17:12
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- 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%'
@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active May 10, 2024 17:12
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
@Hardikanand1st
Hardikanand1st / rarreg.key
Last active May 10, 2024 17:10
WinRar free key rarreg.key
RAR registration data
Hardik
www.Hardik.live
UID=448c4a899c6cdc1039c5
641221225039c585fc5ef8da12ccf689780883109587752a828ff0
59ae0579fe68942c97d160f361d16f96c8fe03f1f89c66abc25a37
7777a27ec82f103b3d8e05dcefeaa45c71675ca822242858a1c897
c57d0b0a3fe7ac36c517b1d2be385dcc726039e5f536439a806c35
1e180e47e6bf51febac6eaae111343d85015dbd59ba45c71675ca8
2224285927550547c74c826eade52bbdb578741acc1565af60e326
@enesien
enesien / shadcn-multi-tag-input.md
Last active May 10, 2024 17:09
shadcn multiple tag input

shadcn/ui multi tag input component

A react tag input field component using shadcn, like one you see when adding keywords to a video on YouTube. Usable with Form or standalone.

Preview

image

Standalone Usage

use_bpm 100
live_loop :pad do
chords = [
[:a2, :g3, :c4, :e4],
[:d2, :f3, :c4, :e4],
[:g2, :f3, :a3, :d4],
[:c2, :g3, :d4, :e4]
]
@lopspower
lopspower / README.md
Last active May 10, 2024 17:08
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 10, 2024 17:09
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@kconner
kconner / macOS Internals.md
Last active May 10, 2024 17:04
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

function setInputValueAndClickButton(value) {
const inputElement = document.getElementById('order-market-input');
if (inputElement) {
inputElement.value = value;
const inputEvent = new Event('input', {
bubbles: true,
cancelable: true,
});