Skip to content

Instantly share code, notes, and snippets.

@copitz
copitz / 2023-12-28_WiFi-Access-Point-On-Proxmox.md
Last active March 27, 2024 20:13
Base for my blog - if I'll ever find the time to publish one

Today I was finally able to realize my plan to use the MT7922 wireless NIC on my my Gigabyte Aorus x670 Elite motherboard as access point. From there I could bridge the traffic to my OpnSense VM running on Proxmox 8.1. Throughout this journey I had some insights that I want to share with the internet.

Firstly I learned that at least on this board it's much easier to pass the wireless card to a LXC instead of passing it through to a virtual machine. I tried the latter first and the vfio-pci driver was just loaded fine for the wifi card but for some reason also for the 2.5Gb realtek NIC, so that I didn't have ethernet on proxmox anymore. So, given that the correct drivers for the MT7922 were loaded on proxmox I just set up an unpriviliged LXC with Debian 12 + the following lines in its config (/etc/pve/lxc/{ID}.conf):

@copitz
copitz / rest.php
Created October 7, 2020 11:51
Call Magento2 REST API from command line without curl
<?php
use Magento\Framework\App\Bootstrap;
use Magento\Framework\App\ErrorHandler;
use Magento\Framework\App\Http;
use Magento\Framework\App\Request\Http as RequestHttp;
use Magento\Framework\Webapi\Rest\Request;
use \Magento\Framework\Webapi\Rest\Response;
use Zend\Http\Header\ContentType;
require 'app/bootstrap.php';
@copitz
copitz / index.js
Created August 28, 2019 07:28
Monitor free dates at Standesamt Leipzig - freie Termine bei Standesamt Leipzig überwachen
const { execFileSync } = require('child_process')
const notifier = require('node-notifier');
const logFile = require('path').resolve(require('os').homedir(), '.standesamt-log')
const fs = require('fs')
const path = require('path')
const casper = path.resolve(__dirname, 'node_modules/casperjs/bin/casperjs')
const scraper = path.resolve(__dirname, 'scraper.js')
let isRunning = false
@copitz
copitz / fix-speedlink-button-map.sh
Created July 14, 2019 14:08
Fix speedlink calado wrong button map on ubuntu (permanently scrolling)
@copitz
copitz / Fix Apache Camel Docs Snippets.user.js
Last active November 4, 2017 04:53
User script to fix missing examples on Apache Camel Docs - use with e.g. Tampermonkey
// ==UserScript==
// @name Fix Apache Camel Docs Snippets
// @namespace http://netresearch.de/
// @version 0.1
// @description Fix missing examples on Apache Camel Docs
// @author Christian Opitz
// @include http://camel.apache.org/*
// @include https://raw.githubusercontent.com/apache/camel/master/*
// @require http://camel.apache.org/styles/highlighter/scripts/shCore.js
// @require http://camel.apache.org/styles/highlighter/scripts/shBrushJava.js
@copitz
copitz / config.js
Last active March 25, 2017 02:43
Add support for filter expressions in database paths to firebase flashlight
/**
* This allows for filter expressions in firebase flashlight paths, e.g.:
* flashlight.paths.users => {
* path: '/users',
* index: 'myindex',
* type: 'user',
* filter: "!data.deleted && !ref('/blocked-users/' + $id) && ref('/user-roles/' + $id) !== 'guest'"
* }
*
* As you see above, there's: