Skip to content

Instantly share code, notes, and snippets.

@Ederhex
Ederhex / 3d-printers-EU.md
Created February 1, 2025 21:20 — forked from cubiq/3d-printers-EU.md
Stores in EU to buy components for 3D Printers

Where to buy 3D printer components in EU

The following is a curated selection of stores where I bought components for my 3D printers together with a short "buying experience". I hope it helps.

By EU I mean unified market (sorry UK). Suggestions are welcome. Random order.

filafarm.de Custom beds, heaters, printing surfaces.

Good quality but very expensive, also pretty long lead times. I bought a custom alu bed, 8mm thickness, it was pretty straight at the beginning but bent pretty heavily over time.

  1. Make sure mysql-client is installed. If not, then :
    sudo apt install mysql-client
	or
    sudo apt-get install mysql-client
  1. Open php.ini

; PHP's default character set is set to UTF-8.

@Ederhex
Ederhex / dokuwikifolder2markdown.js
Created August 20, 2024 23:50 — forked from KaeruCT/dokuwikifolder2markdown.js
nodejs script to convert a dokuwiki data folder to markdown files
const fs = require('fs');
const path = require('path');
const folderPath = './'; // Replace with the actual folder path
// Function to rename a file from .txt to .md and replace content
function renameAndReplace(filePath) {
const newFilePath = filePath.replace('.txt', '.md');
fs.renameSync(filePath, newFilePath);
@Ederhex
Ederhex / Postgres.md
Created April 16, 2024 22:46 — forked from mjf/Postgres.md
Postgres

⚠️ WARNING
The ordering of listed projects or documents is random and has no connection to relevance or maturity levels!

Postgres

Extensions

Extension Description
pgaudit Postgres auditing extension
pg_auto_failover Postgres extension for failover without distributed consensus (by Citus Data)
@Ederhex
Ederhex / postgresql.md
Created April 16, 2024 22:43 — forked from mencargo/postgresql.md
PostgreSQL Queries

Useful PostgreSQL Queries & Commands

All sizes in MB, change /1024/1024 to /1024/1024/1024 for GB.

Databases sizes

Without system databases

select
datname as database,
(pg_database_size(datname)/1024/1024) as size
@Ederhex
Ederhex / pg_tuning_notes.md
Created April 16, 2024 22:40 — forked from lukeasrodgers/pg_tuning_notes.md
postgres conf - tuning notes

269 tunable settings, these 20 are most helpful

max_connections

  • set to useful peak
  • above 200, look at conn pooler
  • consider superuser_reserved_connections

shared_buffers - shared RAM

  • amt of memory pg takes for itself
  • generally, avail ram ÷ 4
@Ederhex
Ederhex / jinja-magic.ipynb
Created December 22, 2023 17:04 — forked from tonyfast/jinja-magic.ipynb
Jinja2 DictLoader example in an IPython notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Ederhex
Ederhex / mdhelper.py
Created December 12, 2023 15:13 — forked from mipro98/mdhelper.py
Markdown-helper script with some functions to detect and fix broken links in markdown files. Intended to be used as a python module.
#!/usr/bin/env python3
import os
import re
from pathlib import Path
# selects location inside markdown links, e.g. [name](/all/this/gets/SELECTED.md) IGNORES WEB LINKS!
regexp_pattern_md_link = re.compile('(?<=\]\()(?!(http[s]?://|www.)).+?(?= ".*"\)|\))')
global working_dir
global verbose
@Ederhex
Ederhex / firewall.sh
Created November 6, 2023 17:02 — forked from cedricwalter/firewall.sh
Restrictive Iptables Based Firewall for Webserver script
#!/bin/bash
# Restrictive Iptables Based Firewall for Webserver script
# Copyright (C) 2012 Cédric Walter - www.waltercedric.com
# Credits to all various authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
### 1: Drop invalid packets ###
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
### 2: Drop TCP packets that are new and are not SYN ###
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
### 3: Drop SYN packets with suspicious MSS value ###
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
### 4: Block packets with bogus TCP flags ###