Skip to content

Instantly share code, notes, and snippets.

View ericthelin's full-sized avatar

Eric Thelin ericthelin

View GitHub Profile
{
"interval": "20000",
"displays": [
{
"fullDraw": false,
"data": [
{
"type": "rectangle",
"x": 0,
"y": 0,
{
"interval": 5000,
"displays": [
{
"label": "CPU",
"data": 48,
"labelColor": "blue",
"color": "red",
"background": "silver",
"alignment": "right"
<?php
//example url config in info-orbs
//#define WEB_DATA_STOCK_WIDGET_URL "http://192.168.10.242/stocks.php?stocks=SPY,VT,GOOG,TSLA,GME"
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$stocks = explode(",", $_GET['stocks']);
$displays = ['interval' => '20000', 'displays' => []];
<?php
//example url config in info-orbs
//#define WEB_DATA_STOCK_WIDGET_URL "http://192.168.10.242/stocks.php?stocks=SPY,VT,GOOG,TSLA,GME"
$stocks = explode(",", $_GET['stocks']);
$displays = ['interval' => '20000', 'displays' => []];
foreach ($stocks as $stock) {
$stockData = outputStockDisplay($stock);
$displays['displays'][] = $stockData;
#!/usr/bin/env perl
# Protect against using git push by mistake without getting a code review through gerrit first
# install by adding the following to your .bashrc (or .zshrc) (after changing the path for the location of the script):
# alias git="$HOME/git-override.pl"
# this also relies on having a git alias for pushing to gerrit in place called "push-refs". Create that by adding the
# following to the [alias] section of your ~/.gitconfig:
# push-refs = push origin HEAD:refs/for/master
use strict;