Skip to content

Instantly share code, notes, and snippets.

View bjarneo's full-sized avatar
🏠
Working from home

bjarneo bjarneo

🏠
Working from home
View GitHub Profile
@bjarneo
bjarneo / coolify.tf
Created November 6, 2024 06:44
Using the Coolify predefined image
# Set the variable value in *.tfvars file
# or using the -var="hcloud_token=..." CLI option
variable "hcloud_token" {
type = string
default = ""
}
# Set the path to your SSH key
variable "ssh_key" {
type = string
@bjarneo
bjarneo / .js
Created May 3, 2025 17:24
pgmqdemo
import pkg from 'pg';
const { Pool, Client } = pkg;
const DATABASE_NAME = 'queue_demo';
const QUEUE_NAME = 'my_simple_queue';
const DEFAULT_DB = 'postgres';
const dbConfig = {
user: 'postgres',
host: 'localhost',
@bjarneo
bjarneo / .sh
Created May 4, 2025 17:32
psql cheatsheet
# psql Cheatsheet
# Connect to a specific database as a specific user
psql -d mydatabase -U myuser -h localhost -p 5432
# Connect using defaults
psql
# List all psql meta-commands
\?