Skip to content

Instantly share code, notes, and snippets.

@guo14
guo14 / log.sh
Created November 22, 2023 17:43 — forked from coreymcmahon/log.sh
Colorize Nginx access log
#!/usr/bin/env bash
tail -f /var/log/nginx/access.log | awk '
/" 2/ {print "\033[32m" $0 "\033[39m"; next;}
/" 3/ {print "\033[37m" $0 "\033[39m"; next;}
/" 4/ {print "\033[33m" $0 "\033[39m"; next;}
/" 5/ {print "\033[31m" $0 "\033[39m"}
'
@guo14
guo14 / esp32_quotes_tda.ino
Last active June 27, 2020 08:21
ESP32 Quotes TDA
/*
* This package does the following:
* - connects to home WiFi,
* - set clock,
* - setup a websocket connection with TD Ameritrade backend,
* - login and subscribe to quotes of some tickers
*/
#include <heltec.h>
#include <ArduinoJson.h>