View replug_vbox_network.cmd
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
@echo off | |
set VboxManageEXE="%VBOX_MSI_INSTALL_PATH%\VBoxManage.exe" | |
set ListRunningVMS=%VboxManageEXE% list runningvms | |
for /f tokens^=2^,4^ delims^=^" %%p in ('%ListRunningVMS%') do ( | |
echo "%%p" | |
%VBoxManageEXE% controlvm %%p setlinkstate1 off | |
%VBoxManageEXE% controlvm %%p setlinkstate1 on | |
) |
View array-insert-after.php
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
<?php | |
/** | |
* Insert a value or key/value pair after a specific key in an array. If key doesn't exist, value is appended | |
* to the end of the array. | |
* | |
* @param array $array | |
* @param string $key | |
* @param array $new | |
* |