- Never use
finalclasses or private methods/properties - Write all code as though it belongs in an official first-party Laravel package. Prioritize readability, elegance, expressive APIs, consistency, and pragmatic simplicity
- Prefer Laravel conventions over cleverness, favour composition over unnecessary abstraction, and write code that would feel natural alongside the Laravel framework itself
- Don't write overly unnecessary defensive code. Prefer exceptions to be thrown organically vs catching all possibilities and handling each individually
- When explaining concepts and/or solutions to bugs, problems, or features, assume I have little or no prior knowledge of the topic unless I have demonstrated otherwise
- When producing GitHub issue/pull-request titles and descriptions, frame it from the point of view of a developer who knows nothing about the bug/feature/system
| { | |
| {$CADDY_GLOBAL_OPTIONS} | |
| admin {$CADDY_SERVER_ADMIN_HOST}:{$CADDY_SERVER_ADMIN_PORT} | |
| frankenphp { | |
| worker { | |
| file "{$APP_PUBLIC_PATH}/frankenphp-worker.php" | |
| {$CADDY_SERVER_WORKER_DIRECTIVE} | |
| {$CADDY_SERVER_WATCH_DIRECTIVES} |
| set -e | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <iterations>" | |
| exit 1 | |
| fi | |
| for ((i=1; i<=$1; i++)); do | |
| echo "Iteration $i" | |
| result=$(claude -p "@test-coverage-progress.txt \ |
| # /etc/sysctl.d/60-sysctl.conf | |
| # Generic Web + DB Server Tuning | |
| # Based on original by Kawin Viriyaprasopsook <kawin.v@kkumail.com> | |
| # Apply with: sysctl --system | |
| ######################## | |
| # Kernel & Memory | |
| ######################## | |
| # Reduce console noise from kernel messages | |
| kernel.printk = 3 4 1 3 |
| @props([ | |
| 'src', | |
| 'title' => null, | |
| 'alt' => null, | |
| ]) | |
| @php | |
| preg_match('/.*\/embed\/([^?&\/]+)/m', $src, $matches); | |
| $id = $matches[1]; | |
| $alt ??= $title ?? 'Embedded YouTube video'; |
This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.
The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.
To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:
touch /etc/cron.daily/pvehost-backup
Follow these steps to install Proxmox VE on a Hetzner server via the Rescue System. The Rescue System is a Linux-based environment that can be booted into to perform system recovery tasks. We'll be using it to install Proxmox VE.
In order to complete the process, it is indeed necessary to first boot into the Rescue System and then connect to it via SSH. This will allow you to run the commands for installing Proxmox VE. Here are the steps:
- Log into the Hetzner Robot.
- Under "Main Functions; Server" select the desired server and then open the tab "Rescue".
| package main | |
| import ( | |
| "net/http" | |
| "fmt" | |
| "time" | |
| ) | |
| func handler(w http.ResponseWriter, r *http.Request) { | |
| fmt.Printf("Request at %v\n", time.Now()) |
| #! /bin/bash | |
| # Copyright (c) 2021 Karol Babioch <karol@babioch.de> | |
| # 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. | |
| # | |
| # This program is distributed in the hope that it will be useful, |
These are the steps to build latest libvips (8.7.4) deb package on ubuntu 18.04
##1. install build scripts
# sudo apt install build-essential devscripts
##2. download vips source