Skip to content

Instantly share code, notes, and snippets.

View metalinspired's full-sized avatar

Milan Divkovic metalinspired

  • Germany
  • 21:56 (UTC +01:00)
View GitHub Profile
@metalinspired
metalinspired / xdebug_docker_rootless.md
Created June 25, 2026 12:28
xDebug with rootless Docker

Install Plug A Simple Socket Transport: sudo apt install passt

Edit: .config/systemd/user/docker.service and add the following to [Service]:

Environment=DOCKERD_ROOTLESS_ROOTLESSKIT_DISABLE_HOST_LOOPBACK=false
Environment=DOCKERD_ROOTLESS_ROOTLESSKIT_NET=pasta
Environment=DOCKERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=implicit
@metalinspired
metalinspired / .dockerignore
Last active November 5, 2026 11:17
Run FlatCAM from within Docker
.git
.github
tests
@metalinspired
metalinspired / wget--crawl.sh
Created September 25, 2025 09:56 — forked from steveosoule/wget--crawl.sh
Wget - Options & Sample Crawler
#!/bin/sh
# wget --mirror --adjust-extension --page-requisites --execute robots=off --wait=30 --rand om-wait --convert-links --user-agent=Mozilla http://www.example.com
### V1
# wget \
# --recursive \
# --no-clobber \
# --page-requisites \
# --html-extension \
@metalinspired
metalinspired / main.cpp
Last active June 4, 2025 08:09
TMC2209 UART
/**
* Author Milan Divkovic
*
* You can control the motor with following commands:
* 0: Disables the motor
* 1: Enables the motor
* + or -: Increase or decrease speed in respect to rotation direction
*/
#include <Arduino.h>
<?php
namespace App\Controller;
use Zend\Http\Request;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;
class SomeController extends AbstractActionController
{
<?php
$subSelect = new Select();
$subSelect
->from(['head_parent' => $this->config->getTable()])
->columns([])
->join(
['parent' => $this->config->getTable()],
new Expression(
'?.? >= ?.? AND ?.? < ?.?',