This file contains hidden or 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
| if ! [[ "18.04 20.04 22.04 24.04 25.10" == *"$(grep VERSION_ID /etc/os-release | cut -d '"' -f 2)"* ]]; | |
| then | |
| echo "Ubuntu $(grep VERSION_ID /etc/os-release | cut -d '"' -f 2) is not currently supported."; | |
| exit; | |
| fi | |
| # Download the package to configure the Microsoft repo | |
| curl -sSL -O https://packages.microsoft.com/config/ubuntu/$(grep VERSION_ID /etc/os-release | cut -d '"' -f 2)/packages-microsoft-prod.deb | |
| # Install the package | |
| sudo dpkg -i packages-microsoft-prod.deb |
This file contains hidden or 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 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 \ |
This file contains hidden or 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
| # 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 |
This file contains hidden or 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
| # 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 |
This file contains hidden or 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 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 \ |
This file contains hidden or 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
| kumpulan query utilitas untuk postgresql |
This file contains hidden or 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/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; |
This file contains hidden or 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
| -- 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 |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| -- postlinks | |
| TRUNCATE data_load; | |
| copy data_load FROM 'C:\workspaces\stackoverflow-postgresql\PostLinks.xml'; | |
| INSERT INTO postlinks ( | |
| Id, creationdate, postId, relatedPostId, LinkTypeId) | |
| SELECT | |
| (xpath('//@Id', x))[1]::text::int |
NewerOlder