Skip to content

Instantly share code, notes, and snippets.

@ca4ti
ca4ti / README.md
Created February 3, 2025 21:53 — forked from pythoninthegrass/README.md
Ollama + Continue.dev VSCode settings

Ollama

Quickstart

# install ollama
brew install --cask ollama

# install continue.dev
code --install-extension Continue.continue
@ca4ti
ca4ti / proxmox-network.md
Created February 2, 2025 19:15 — forked from vduseev/proxmox-network.md
Proxmox network setup with multiple IPs on a single interface

Proxmox network setup

Configuration for Proxmox host to support multiple IP addresses through a single interface.

Initial configuration

Initially, with a single IP and a single interface, the configuration looks like this.

auto lo
ffmpeg -i Michael_Jackson_–_Bad.mp3 -ar 8000 -ac 1 -ab 64 out_2.wav
@ca4ti
ca4ti / migrate
Created December 3, 2024 00:26 — forked from davidcastellani/migrate
Move Proxmox Container to Different Storage (Updated for LXC)
#!/bin/bash
#
# Filename : migrate
# Description : Migrate Proxmox OpenVZ container from one storage to another
# Author : James Coyle
# URL: https://www.jamescoyle.net/how-to/2863-move-proxmox-container-to-different-storage-2
# Version:
# -Date -Author -Description
# 20-11-2013 James Coyle Initial
# 13-12-2017 James Coyle Changes for LXC
@ca4ti
ca4ti / createdb-with-locale.sh
Created October 2, 2024 19:22 — forked from khoazany/createdb-with-locale.sh
Create a new PostgreSQL database with UTF8 encoding
#Replace 'symplcms' with the database'name
createdb --template=template0 --locale=en_US.UTF-8 --encoding=UTF8 -U postgres symplcms
@ca4ti
ca4ti / DBeaver Ultimate Keygen
Created October 2, 2024 19:01 — forked from proslemitowm/DBeaver Ultimate Keygen
DBeaver Ultimate 24.0.0.202403110838 Crack License Key [2024]
DBeaver Ultimate License Key
@ca4ti
ca4ti / conclusion.md
Created September 23, 2024 19:24 — forked from LeonStoldt/conclusion.md
Postgres Optimization and Performance Tuning

Postgres Optimization and Performance Tuning

based on the following article: An Introduction to PostgreSQL Performance Tuning and Optimization

Resource Usage

  • huge pages: Enabling on Linux will give a performance boost to PostgreSQL (VMPeak / HugePageSize = 4310)
  • max_connections: optimal number is roughly 4 times the number of CPU cores. The recommended number is the GREATEST(4 x CPU cores, 100). Beyond this number, a connection pooler such as pgbouncer should be used. avoid setting max_connections too high as it will increase the size of various data structures in Postgres which can result in CPU cycles being wasted
  • shared_buffers: variable by workload - starting Point: LEAST(RAM/2, 10GB).
  • work_mem: ((Total RAM - shared_buffers)/(16 x CPU cores))
  • maintenance_work_mem: 1GB good start
  • effective_io_concurrency: SSD = 200, HDD = Number of Disks
@ca4ti
ca4ti / lxd-usage.txt
Created September 8, 2024 14:22 — forked from ruanbekker/lxd-usage.txt
LXD Usage
Docs - LXD Helpful Docs:
https://www.stgraber.org/2016/03/30/lxd-2-0-image-management-512/
https://www.flockport.com/flockport-first-look-at-lxd/
http://insights.ubuntu.com/2016/03/14/the-lxd-2-0-story-prologue/
Docs - Installation:
http://insights.ubuntu.com/2016/03/14/the-lxd-2-0-story-prologue/
Docs - API:
https://linuxcontainers.org/lxd/getting-started-cli/
@ca4ti
ca4ti / LXC-LXD-2.x-curl-API.md
Created September 8, 2024 14:19 — forked from jaytaylor/LXC-LXD-2.x-curl-API.md
HOWTO: Curl the LXD unix.socket file.

It is possible to use curl to query the LXD unix.socket directly:

curl --unix-socket /var/lib/lxd/unix.socket http:/1.0/containers | jq .

Example output:

{
@ca4ti
ca4ti / convert_ova_docker.md
Created August 31, 2024 11:36 — forked from ihatem/convert_ova_docker.md
Convert a VirtualBox ova file to a Docker image