Usually Longhorn devices attached to a node are usually:
/dev/longhorn/{volumename}
So just mount it to a temporary folder and unmount it when finished:
sudo mount /dev/longhorn/{volumename} tempmount
--- Get total WAL sizes / file count | |
SELECT | |
pg_size_pretty(SUM(size)) AS total_wal_size, | |
COUNT(*) AS wal_file_count | |
FROM pg_ls_dir('pg_wal') f(name) | |
JOIN LATERAL pg_stat_file('pg_wal/' || name) s ON true | |
WHERE name ~ '^[0-9A-F]{24}$'; | |
--- Get sizes per db | |
SELECT |
# This script is old, archived, and has deprecated dependencies (including security vulnerabilities) | |
# But I don't care this still works so oh well | |
pnpx eclint fix |
Usually Longhorn devices attached to a node are usually:
/dev/longhorn/{volumename}
So just mount it to a temporary folder and unmount it when finished:
sudo mount /dev/longhorn/{volumename} tempmount
import { defineConfig } from 'unocss' | |
import presetIcons from '@unocss/preset-icons' | |
import presetWebFonts from '@unocss/preset-web-fonts' | |
import presetWind4 from '@unocss/preset-wind4' | |
import presetTypography from '@unocss/preset-typography' | |
export default defineConfig({ | |
presets: [ | |
presetWind4({ | |
dark: 'media' |
// modified version of https://hackmd.io/@Markdown-It/HJeV6339X | |
export function getContrastYIQ(hexcolor: string): string { | |
const hex = hexcolor.replace('#', '') | |
const r = parseInt(hex.slice(0, 2), 16) | |
const g = parseInt(hex.slice(2, 4), 16) | |
const b = parseInt(hex.slice(4, 6), 16) | |
const yiq = (r * 299 + g * 587 + b * 114) / 1000 | |
return yiq >= 120 ? 'black' : 'white' | |
} |
// Original answer here https://community.cloudflare.com/t/quick-tunnel-from-nodejs/336868/3 | |
const express = require('express'); | |
const { spawn } = require('child_process'); | |
let port = 8080; | |
// Express | |
let app = express(); | |
app.get('/', (req, res) => res.send('Hi')); | |
app.listen(port); |