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 |
#!/bin/bash | |
yum install epel-release -y | |
yum install nginx -y | |
export HOSTNAME=$(curl -s http://169.254.169.254/metadata/v1/hostname) | |
export PUBLIC_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address) | |
echo Droplet: $HOSTNAME, IP Address: $PUBLIC_IPV4 > /usr/share/nginx/html/index.html | |
systemctl enable nginx | |
systemctl start nginx |
#!/bin/bash | |
#================================================================ | |
# Let's Encrypt renewal script for Apache on Ubuntu/Debian | |
# @author Erika Heidi<erika@do.co> | |
# Usage: ./le-renew.sh [base-domain-name] | |
# More info: http://do.co/1mbVihI | |
#================================================================ | |
domain=$1 | |
le_path='/opt/letsencrypt' | |
le_conf='/etc/letsencrypt' |
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; |
#!/bin/bash | |
#================================================================ | |
# Let's Encrypt renewal script for Apache on CentOS | |
# @author Erika Heidi<erika@do.co> | |
# Usage: ./le-renew.sh [base-domain-name] | |
# More info: http://do.co/1SHe4eL | |
#================================================================ | |
domain=$1 | |
le_path='/opt/letsencrypt' | |
le_conf='/etc/letsencrypt' |
<?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"; |
total | Language |
---|---|
2477 | JavaScript |
1399 | Python |
1051 | NULL |
715 | TypeScript |
631 | Java |
This is an example of PHP code to send commands via serial, as shown in the talk:
<?php
require __DIR__ . '/vendor/autoload.php';