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
/** | |
* Include this at the start of script, then on every FILE that you want to profile add | |
* declare(ticks=1); | |
*/ | |
function mem() | |
{ | |
$bytes = memory_get_usage(false); | |
if ($bytes >= 1048576) { | |
return number_format($bytes / 1048576, 2).' mb'; | |
} |
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
network: | |
version: 2 | |
renderer: networkd | |
ethernets: | |
enp0s3: | |
dhcp4: no | |
addresses: [192.168.1.37/24] | |
gateway4: 192.168.1.1 | |
nameservers: | |
addresses: [8.8.8.8,8.8.4.4] |
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
# This file describes the network interfaces available on your system | |
# and how to activate them. For more information, see interfaces(5). | |
source /etc/network/interfaces.d/* | |
# The loopback network interface | |
#auto lo | |
#iface lo inet loopback | |
# The primary network interface |
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 | |
/** | |
* Counter class | |
* @author Jamiel Sharief | |
* @example $Counter = Counter::init('default',10000); | |
* $i = $Counter->next(); | |
*/ | |
class Counter | |
{ | |
protected static $singleton = []; |
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 | |
/** | |
* Timer Class | |
* @author Jamiel Sharief | |
* @example Timer::start(); | |
* $took = $Timer::end(); | |
*/ | |
Class Timer | |
{ | |
private static $milliseconds = false; |