pecl channel-update pecl.php.net
pecl clear-cache
pecl install xdebug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3 cp \ | |
s3://bucket/path/ \ | |
s3://bucket/path/ \ | |
--exclude '*' \ | |
--include '*.png' \ | |
--no-guess-mime-type \ | |
--content-type="image/png" \ | |
--metadata-directive="REPLACE" \ | |
--recursive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yt-dlp --download-archive archive.txt --no-abort-on-error --exec "ffmpeg -i {} -target pal-dvd -q:v 20 -aspect 16:9 -y {}.mpg && rm {}" https://www.youtube.com/playlist?list=xxxx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://bench.sh | |
curl -Lso- bench.sh | bash | |
# https://github.com/masonr/yet-another-bench-script | |
curl -sL yabs.sh | bash | |
# Ref | |
# https://repo.telematika.org/project/haydenjames_bench-scripts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################### | |
# Helpful Docker commands and code snippets | |
############################################################################### | |
### CONTAINERS ### | |
docker stop $(docker ps -a -q) #stop ALL containers | |
docker rm -f $(docker ps -a -q) # remove ALL containers | |
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter | |
# exec into container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: "2.0" | |
info: | |
description: "Ini adalah dokumentasi API Specification untuk challenge Get Nearby Places." | |
version: "1.0.0" | |
title: "Get Nearby Places" | |
host: "localhost:8000" | |
schemes: | |
- "http" | |
- "https" | |
paths: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d | |
# https://github.com/kubernetes/kubernetes/issues/55051 | |
# delete all evicted pods from all namespaces | |
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod | |
# delete all stuck shutdown | |
kubectl get pods --all-namespaces | grep Shutdown | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello {param1} | |
This is your invoice number {param2} | |
Total cost: {param3} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docker | |
docker run -d -v /var/run/docker.sock:/var/run/docker.sock:ro -v /proc/:/host/proc/:ro -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro -p 8126:8126 -e DD_API_KEY=XXX datadog/agent:latest | |
docker run -p 8080:8080 -e APP_KEY="base64:DehW3/DSAR0r4R+tEOuT8MUw/br98yVdOWHbaVh/qsk=" --rm -it -e CONTAINER_ROLE=app -e DD_AGENT_HOST=172.17.0.3 -e DD_SERVICE=test-service -e DD_ENV=production -e DD_VERSION=1.0.0 micro-datadog | |
# Kubernetes | |
# https://docs.datadoghq.com/agent/kubernetes/?tab=helm | |
helm install datadog-agent -f values.yaml datadog/datadog --set datadog.apiKey=XXX --set targetSystem=linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.13 | |
LABEL Maintainer="Yoga Hanggara <yohang88@gmail.com>" \ | |
Description="Lightweight Laravel app container with Nginx 1.18 & PHP-FPM 8 based on Alpine Linux." | |
ARG PHP_VERSION="8.0.2-r0" | |
# Install packages | |
RUN apk --no-cache add php8=${PHP_VERSION} php8-fpm php8-opcache php8-openssl php8-curl php8-phar php8-session \ | |
php8-fileinfo php8-pdo php8-pdo_mysql php8-mysqli php8-mbstring php8-dom \ |
NewerOlder