Skip to content

Instantly share code, notes, and snippets.

View angrychimp's full-sized avatar

Randall Kahler angrychimp

View GitHub Profile
@angrychimp
angrychimp / parse-json.php
Created December 28, 2021 17:08
Fine JSON errors in JSONL file
<?php
$fin = fopen($argv[1], 'r');
$lno = 0;
while ($line = fgets($fin)) {
$lno++;
try {
$decoded = json_decode($line, true, 512);
if ($decoded === null && json_last_error() !== JSON_ERROR_NONE) {
throw new \Exception("Invalid JSON format");
@angrychimp
angrychimp / awsc-mezz-data.json
Created February 16, 2023 23:43
AWS Console Service Manifest
{
"regions": [
{
"id": "us-east-1",
"name": "US East",
"location": "N. Virginia",
"optIn": false
},
{
"id": "us-east-2",