Skip to content

Instantly share code, notes, and snippets.

@pvanfas
pvanfas / Awesome PHP.md
Last active July 16, 2024 04:10
A curated list of amazingly awesome PHP libraries, resources and shiny things.
@triangletodd
triangletodd / README.md
Last active July 6, 2024 01:03
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@soerenmartius
soerenmartius / _src_modules_auth_store_index.ts
Last active June 29, 2023 02:28
Vue 3 with Typescriptt and Vuex 4 Typed Modules Examples ( with real types )
import {
ActionContext,
ActionTree,
GetterTree,
MutationTree,
Module,
Store as VuexStore,
CommitOptions,
DispatchOptions,
} from 'vuex'
@ryanburnette
ryanburnette / Caddyfile
Last active July 9, 2024 01:41
Caddy v2.1+ CORS whitelist
(cors) {
@cors_preflight{args.0} method OPTIONS
@cors{args.0} header Origin {args.0}
handle @cors_preflight{args.0} {
header {
Access-Control-Allow-Origin "{args.0}"
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
Access-Control-Allow-Headers *
Access-Control-Max-Age "3600"
@aw
aw / explain.md
Last active April 28, 2024 10:05
[SOLVED] Proxmox VE and cloud-init snippets etc

Proxmox VE 6.x release includes a feature to add custom cloud-init configs. Unfortunately there is poor documentation, so I had to figure this out by adding pieces of information together.

The custom cloud-init files (user-data, meta-data, network-config)

The cloud-init files need to be stored in a snippet. This is not very well documented:

  1. Go to Storage View -> Storage -> Add -> Directory
  2. Give it an ID such as snippets, and specify any path on your host such as /snippets
  3. Under Content choose Snippets and de-select Disk image (optional)
  4. Upload (scp/rsync/whatever) your user-data, meta-data, network-config files to your proxmox server in /snippets/snippets/ (the directory should be there if you followed steps 1-3)
@ShahinSorkh
ShahinSorkh / .php_cs
Last active September 17, 2020 13:38
php-cs-fixer config to follow laravel style guides
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->name('*.php')
->notName('_ide_helper.php')
->notName('*.blade.php')
->notPath('bootstrap')
->notPath('node_modules')
->notPath('storage')
@chriswayg
chriswayg / Ubuntu_Debian_Cloud_images_in_Proxmox.md
Last active July 23, 2024 20:44
Ubuntu and Debian Cloud images in Proxmox
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active July 17, 2024 16:29
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@MerNat
MerNat / gist:8ee69c5eeaa4ac909b0044f48e9569b0
Last active October 29, 2023 13:07
Traefik docker compose yml for cluster or swarm configuration.
version: '3.4'
services:
consul-leader:
image: consul
command: agent -server -client=0.0.0.0 -bootstrap -ui
volumes:
- consul-data-leader:/consul/data
environment:
- CONSUL_BIND_INTERFACE=eth0
@TomFaulkner
TomFaulkner / ubuntu18.04-vfio.md
Last active February 3, 2024 15:28
VFIO Setup on Ubuntu 18.04