Skip to content

Instantly share code, notes, and snippets.

View radityopw's full-sized avatar

radityo radityopw

View GitHub Profile
@radityopw
radityopw / Dockerfile
Created December 18, 2025 13:25
Docker Ubuntu 20.04 apache2 php mysqldriver
FROM ubuntu:20.04
LABEL author="Radityo P W (radityo.p.w@gmail.com)"
ENV DEBIAN_FRONTEND=noninteractive TZ="Asia/Jakarta"
# UPDATE PACKAGES
RUN apt update
# INSTALL SYSTEM UTILITIES
RUN apt install -y \
@radityopw
radityopw / Dockerfile
Created July 20, 2025 14:22
Docker file untuk GCP php 8.3 versi CLI dengan ext grpc dan protobuf, digunakan untuk cloud run job
# Use the official PHP image.
# https://hub.docker.com/_/php
FROM php:8.3-cli
# Menginstal dependensi yang diperlukan untuk ekstensi PHP
# Pastikan untuk membersihkan cache APT setelah instalasi untuk menjaga ukuran image tetap kecil
RUN apt-get update && apt-get install -y libcurl4-openssl-dev autoconf zlib1g-dev && rm -rf /var/lib/apt/lists/*
# Menginstal ekstensi PHP curl
@radityopw
radityopw / Dockerfile
Created July 20, 2025 13:26
Docker file untuk php 8.3 yang dibuat khusus untuk GCP dengan library firestore dan cloud storage
# Use the official PHP image.
# https://hub.docker.com/_/php
FROM php:8.3-apache
# Menginstal dependensi yang diperlukan untuk ekstensi PHP
# Pastikan untuk membersihkan cache APT setelah instalasi untuk menjaga ukuran image tetap kecil
RUN apt-get update && apt-get install -y libcurl4-openssl-dev autoconf zlib1g-dev && rm -rf /var/lib/apt/lists/*
# Menginstal ekstensi PHP curl
@radityopw
radityopw / Dockerfile
Last active July 18, 2025 07:34
Docker file untuk build image php di ubuntu 24.04 LTS yang siap menggunakan firestore di gcp
FROM ubuntu:24.04
LABEL author="Radityo P W (radityo.p.w@gmail.com)"
# UPDATE PACKAGES
RUN apt update
# INSTALL SYSTEM UTILITIES
RUN apt install -y \
build-essential \
apache2 \
@radityopw
radityopw / a-pg-util-query.txt
Last active November 29, 2024 00:58
query utilitas postgresql
kumpulan query utilitas untuk postgresql
@radityopw
radityopw / contoh-proses-shell
Last active November 22, 2024 08:56
duckdb php wrapper
#!/bin/bash
rm temp.duckdb
duckdb temp.duckdb <<-EOL
INSTALL postgres;
LOAD postgres;
ATTACH 'dbname=Adventureworks host=127.0.0.1 user=postgres password=postgres' AS db (TYPE POSTGRES, READ_ONLY);
SELECT count(*) as jml FROM db.sales.customer;
@radityopw
radityopw / contoh restore dari base + wal
Last active November 20, 2024 13:34
catatan postgresql
-- copy dari c:\postgresql\12-backup\base ke c:\PostgreSQL\12-radit-test
-- ubah postgresql.conf
-- ganti port (saya ganti ke 5433)
-- matikan archive wal
-- comment tentang wal
restore_command = 'copy "C:\\PostgreSQL\\12-backup\\archive\\%f" "%p"'
--jika PITR (point in time recovery) isi recovery_target_time = '' misalnya 2023-02-23 14:32:00
@radityopw
radityopw / README-SQLSERVER-BACKUP-TOOLS
Last active September 5, 2024 06:49
sqlserver backup restore utility
1. tools ini melaklukan backup pada database (SQLServer) user (selain sys database) di server windows ke server SFTP berbasis linux
kebutuhan :
1. PHP : php.net
2. sqlcmd : https://learn.microsoft.com/en-us/sql/tools/sqlcmd/sqlcmd-utility?view=sql-server-ver16
3. bcp : https://learn.microsoft.com/en-us/sql/tools/bcp-utility?view=sql-server-ver16&tabs=windows
4. pscp : bagian dari putty (https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
5. script untuk transfer login : https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/security/transfer-logins-passwords-between-instances
6. aws cli : https://min.io/docs/minio/linux/integrations/aws-cli-with-minio.html
@radityopw
radityopw / postlinks.sql
Created May 27, 2024 10:21
import stackoverflow xml files to postgresql
@radityopw
radityopw / Dockerfile
Last active November 17, 2023 13:41
Dockerfile Alpine-3.18 dan PHP-8.1 min edition
FROM alpine:3.18
LABEL author="Radityo P W (radityo.p.w@gmail.com)"
RUN apk update
RUN apk add apache2 nano
RUN apk add php81 php81-apache2 php81-common php81-curl php81-mysqli php81-sqlite3 php81-ffi
RUN rm -rf /var/cache/apk/*