Example Apko build via pure Docker
docker run -iv --rm -v ${PWD}:/home/nonroot distroless.dev/apko build /home/nonroot/minicli-php81.yaml minicli:php81 /home/nonroot/minicli-php81.tar
Example Apko build via pure Docker
docker run -iv --rm -v ${PWD}:/home/nonroot distroless.dev/apko build /home/nonroot/minicli-php81.yaml minicli:php81 /home/nonroot/minicli-php81.tar
contents: | |
repositories: | |
- https://dl-cdn.alpinelinux.org/alpine/edge/main | |
- https://dl-cdn.alpinelinux.org/alpine/edge/community | |
packages: | |
- alpine-baselayout | |
- php81 | |
- php81-common | |
- php81-curl |
public function foo(Foo|Bar $input): int|float;
$dateAsString = $booking->getStartDate()?->asDateTimeString();
function foo(string $a, string $b, ?string $c = null, ?string $d = null)
font = "DejaVu Sans:style=Bold"; | |
letter_size = 40; | |
height = 8; | |
string = "DEV"; | |
textlen = len(string); | |
box_width = letter_size*textlen*1.1; | |
box_height = letter_size*1.2; |
total | Language |
---|---|
2477 | JavaScript |
1399 | Python |
1051 | NULL |
715 | TypeScript |
631 | Java |
<?php | |
#################################### | |
# Dynamic Inventory Build Script | |
# usage: php doin.php > inventory | |
#################################### | |
$DO_API_TOKEN = 'YOUR_DIGITALOCEAN_API_TOKEN'; | |
$GROUP_NAME = 'servers'; | |
$endpoint = "https://api.digitalocean.com/v2/droplets"; |
This is an example of PHP code to send commands via serial, as shown in the talk:
<?php
require __DIR__ . '/vendor/autoload.php';
font = "Ubuntu Mono"; | |
letter_size = 60; | |
padding = 20; | |
string = "@erikaheidi"; | |
textlen = len(string); | |
box_width = letter_size*textlen*0.8; | |
box_height = letter_size + (2*padding); | |
box_thickness = 20; |
<?php | |
require 'vendor/autoload.php'; | |
use PiPHP\GPIO\GPIO; | |
use PiPHP\GPIO\Pin\PinInterface; | |
$gpio = new GPIO(); | |
$pin = $gpio->getOutputPin(19); |
<?php | |
require __DIR__ . '/vendor/autoload.php'; | |
$serial = new PhpSerial(); | |
$serial->deviceSet("/dev/ttyUSB0"); | |
$serial->confBaudRate(19200); | |
$serial->confParity("none"); | |
$serial->confCharacterLength(8); |