Skip to content

Instantly share code, notes, and snippets.

View Danack's full-sized avatar

Danack

  • Bristol, England
View GitHub Profile
@Danack
Danack / gist:6bd30de6247bc5148986
Last active April 13, 2017 08:23
PHP memory recursive.
<?php
$performGC = false;
if ($performGC) {
echo "GC collection will be done - app should not crash.\n";
}
else {
echo "GC collection won't be done - app should crash.\n";
@Danack
Danack / batchStrace.sh
Created April 29, 2015 18:08
Batch strace
#!/bin/bash
# Prevent strace from abbreviating arguments?
# You want the -s strsize option, which specifies the maximum length of a string to display (the default is 32).
# running siege
# siege -d10 -c50 http://basereality.test
@Danack
Danack / ReferencesRock
Created May 5, 2015 12:21
References rock
<?php
$numbers = [];
define('size', 10000);
for ($i=0 ; $i<size; $i++) {
$numbers[] = $i;
}

Hold my beer and watch this