Skip to content

Instantly share code, notes, and snippets.

View dstuchbury's full-sized avatar

Dan Stuchbury dstuchbury

  • T Shirt & Sons
  • Wiltshire, UK
View GitHub Profile

Keybase proof

I hereby claim:

  • I am dstuchbury on github.
  • I am dstuchbury (https://keybase.io/dstuchbury) on keybase.
  • I have a public key ASD9bnOl58iEbWppEMa20ADA84_lC4nZwLdZ_V1qY8SRKgo

To claim this, I am signing this object:

@dstuchbury
dstuchbury / example.php
Created June 11, 2019 09:29
PHP JSON Error Check
// "\Log::info(.....)" is specifically Laravel, replace with your own logging message if required)
$decoded = json_decode($request->getContent(), 1);
switch (json_last_error()) {
case JSON_ERROR_NONE:
\Log::info('JSON Decode Error: No errors');
break;
case JSON_ERROR_DEPTH:
\Log::info('JSON Decode Error: Maximum stack depth exceeded');
@dstuchbury
dstuchbury / MarkdownEditing Settings.json
Created February 10, 2017 10:11
MarkdownEditing Settings
{
"highlight_line": false,
"color_scheme": "Packages/MarkdownEditing/MarkdownEditor.tmTheme",
"draw_centered": false,
"wrap_width": false,
"font_size": 12
}
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"detect_indentation": false,
"draw_minimap_border": true,
"font_face": "Source Code Pro",
"highlight_modified_tabs": true,
"ignored_packages":
[