Skip to content

Instantly share code, notes, and snippets.

View fquinto's full-sized avatar

Fran Quinto fquinto

View GitHub Profile
@fquinto
fquinto / tailc
Last active October 25, 2021 18:48 — forked from liufuyang/tailc
Color output of linux tail command
#!/bin/bash
# Laravel PHP coloring logger
# save this file as tailc then
# run as: $ tailc logs/supplier-matching-worker.log Words_to_highlight
file=$1
if [[ -n "$2" ]]; then
color='
@fquinto
fquinto / errors.php
Last active June 14, 2018 06:46
PHP Hypertext Transfer Protocol (HTTP) Status Code Registry
<?php
/**
* Prepared for LARAVEL
* FROM: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
* IANA Last Updated: 2017-12-20
**/
'code' => [
'100' => 'Continue', // [RFC7231, Section 6.2.1]
'101' => 'Switching Protocols', // [RFC7231, Section 6.2.2]
'102' => 'Processing', // [RFC2518]
@fquinto
fquinto / lnav_format_laravelpython.json
Created May 22, 2018 09:24
Laravel Python format for lnav
{
"pythonlogger": {
"title": "Python logger format",
"description": "Log format used by python logger class",
"url": "",
"regex": {
"main" : {
"pattern": "^\\[(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2})\\] python\\.(?<level>\\w+): (?<module>\\w+)\\.py (?<body>.*)$"
}
},