Skip to content

Instantly share code, notes, and snippets.

View zulfadlisukarno's full-sized avatar
🏠
Working from home

Zulfadli Sukarno zulfadlisukarno

🏠
Working from home
View GitHub Profile
@zulfadlisukarno
zulfadlisukarno / shutdown-all-vbox-vm.sh
Created December 14, 2020 15:20
This script will graceful power down all VM and wait for 30 seconds. After that it will kill remaining VM that still not powerdown.
#!/bin/bash
row=`vboxmanage list runningvms | wc -l`
col=0
# Send ACPI shutdown first
while read -r name; do
echo "Stopping VM $(echo $name |cut -d \{ -f 1)..."
VBoxManage controlvm "$(echo $name |cut -d \{ -f 2 |sed 's/.$//')" acpipowerbutton &> /dev/null
done < <(VBoxManage list runningvms)
@zulfadlisukarno
zulfadlisukarno / Vagrantfile
Created December 18, 2018 04:20
Vagrantfile for setting up existing CakePHP project
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at