Skip to content

Instantly share code, notes, and snippets.

@sgchris
sgchris / fix_json_indentation.ps1
Last active July 6, 2021 13:56
Fix JSON indentation - fix result of ConvertTo-Json command
function FixJsonIndentation ($jsonOutput)
{
if (!$jsonOutput -or $jsonOutput.trim() -eq "") {
return $jsonOutput
}
$currentIndent = 0
$tabSize = 4
$lines = $jsonOutput.Split([Environment]::NewLine)
$newString = ""
@sgchris
sgchris / gist:0bd21403841e78d75d23
Last active October 16, 2015 09:06
ZendCon 2015 "What happens in runtime DOESN'T stay in runtime" tutorial introduction

Hi,

Thank you for attending to my tutorial, I really appreciate that.

In this tutorial I am going to introduce you Zend's Z-Ray. You will see the way it displays valuable information about the run-time of PHP, and how easily it can be extended.

We will start from understanding the basics of Z-Ray, continue to writing simple extension and end up with creating advanced extensions with our own custom data visualization.