Skip to content

Instantly share code, notes, and snippets.

@a-l-e-c
a-l-e-c / VSCodium using PHP Interpreter within Docker.md
Last active September 5, 2022 03:51
Steps to setup VSCodium for SSH, xdebug & PHPUnit using PHP Interpreter within a Docker container

For anyone following something like Pascal Landau's tutorial, here are some adjustments for doing the same, but using VSCodium instead of PHPStorm as your IDE of choice

These steps will help you use the PHP Interpreter running inside a specific docker container (in these steps, the PHP I want to use is located in a docker container called dofroscra_local-php-fpm-1)

Requirements

  1. A single bash script we will use to run/debug the PHP code on our chosen docker container. For the instructions below the location of this bash script will be shown as /path/to/bash/script/php[^1]
#!/bin/bash
container=$PHP_DOCKER_CONTAINER
@a-l-e-c
a-l-e-c / raspberrypi_ping_test.py
Last active November 21, 2021 17:44
Raspberry Pi: Play buzzer sound if internet connection drops or returns
from gpiozero import TonalBuzzer
from gpiozero.tones import Tone
from gpiozero.tools import sin_values
from time import sleep
import subprocess
tb = TonalBuzzer(18) #GPIO number for buzzer positive cable (negative cable to any Ground GPIO)
def pingit(theIp):
cmd = ["ping", "-c", "1", "-W", "3", "-n", theIp]