Skip to content

Instantly share code, notes, and snippets.

@budiantoip
budiantoip / Vagrant Template.md
Last active August 3, 2025 03:18
Vagrant Template
Vagrant.configure("2") do |config|
    # Vagrant.require_version ">= 1.7"

    config.vm.box = "ubuntu/jammy64" 
    # config.vm.box_version = "4.3.8"

    # Install VirtualBox's Guest Additions CD image
    if Vagrant.has_plugin?("vagrant-vbguest") then
        # config.vbguest.auto_update = true
@budiantoip
budiantoip / Usable MacOS Terminal Utility List.md
Created August 3, 2025 03:08
Usable MacOS Terminal Utility List

A memory usage utility for macOS (similar with 'free' in Linux)

brew tap zfdang/free-for-macOS
brew install free-for-macOS

Put these in wp-config.php

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@budiantoip
budiantoip / Debug Linux Process.md
Last active May 9, 2025 07:29
Debug Linux Process

Show a list of all running nginx processes, along with their PIDs and full command lines

ps -C nginx -o pid,cmd
  • ps -C nginx: select processes with the command name nginx.
  • -o pid,cmd: show only the PID and COMMAND columns.

List the PIDs of all processes with the command name nginx, sorted by start time (oldest first).

@budiantoip
budiantoip / Email Transfer with doveadm and imapsync.md
Last active May 29, 2025 19:20
Email Transfer with doveadm and imapsync
@budiantoip
budiantoip / How to compile php 8.3.20 on CentOS 7.md
Last active June 12, 2025 22:18
How to compile php 8.3.20 on CentOS 7

Compile PHP 8.3.20 along with all required extensions

#!/bin/bash

sudo su

yum groupinstall -y "Development Tools"
yum install -y epel-release
yum install -y gcc gcc-c++ make autoconf bison re2c libxml2-devel bzip2-devel curl-devel \
    libpng-devel libjpeg-devel libXpm-devel freetype-devel gmp-devel mariadb-devel \
@budiantoip
budiantoip / imunify scripts.md
Last active June 26, 2025 01:28
imunify scripts

Get List of Users

This script will get a list of users. Adjust the domain variable as needed.

vim /etc/sysconfig/imunify360/get-users-script.sh
    #!/bin/bash

    # Script to generate user info in JSON format based on UID_MIN and UID_MAX

    # Extract UID_MIN and UID_MAX from /etc/login.defs
    UID_MIN=$(awk '/^UID_MIN/ { print $2 }' /etc/login.defs)
@budiantoip
budiantoip / How to Setup SFTP.md
Last active April 16, 2025 07:50
How to Setup SFTP

1. How to Setup SFTP

Let's assume the ssh username is dev

Open sshd_config

vim /etc/ssh/sshd_config

Then add

@budiantoip
budiantoip / How to install Cloudflare WARP to an Ubuntu server.md
Last active March 28, 2025 09:23
How to install Cloudflare WARP to an Ubuntu server

Installation

curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ jammy main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list
sudo apt-get update && sudo apt-get install -y cloudflare-warp

Configuration

  1. Run this command: