Skip to content

Instantly share code, notes, and snippets.

@ca4ti
ca4ti / Smartphone USB Tethering to an OpenWrt router
Created May 17, 2025 10:29 — forked from OoHerbethoO/Smartphone USB Tethering to an OpenWrt router
USB tethering is used to connect your OpenWrt Router to the Internet by using the your smartphone. It's more convenient and has better performance (lower latency) than turning your smartphone into an access point and using that. It also is less of a CPU load on your phone, charges your phone, and allows you the flexibility of doing things with y…
Installation
For the easiest installation, have a wired ethernet upstream internet connection to boot-strap this process. You will need: the router, your tethering phone, necessary cables, a laptop and an upstream internet connection via ethernet for initial setup. Instead of a wired upstream connection to plug into the router WAN port, is also possible to download necessary packages below, through your laptop while tethered to your phone, the same way you can get the OpenWrt distribution for your router. That is not covered in this guide.
Once OpenWRT is installed on the router,
Install some Kernel packages to get USB tethering support: Go to http://192.168.1.1 and log in to the router. Click on System, Administration, and SSH. Set the 'Interface' to 'LAN', then click 'Save & Apply'. You can now use an SSH client like Putty to connect to the router and issue commands. SSH into the router on 192.168.1.1 and log in.
Enter the commands:
opkg update
@ca4ti
ca4ti / localNetworkChat.html
Created April 20, 2025 14:15 — forked from sneha-belkhale/localNetworkChat.html
Local Network Chat -- (python server + frontend + linux daemon Init Script for the server )
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
display: flex;
justify-content: center;
align-items: center;
@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/