Skip to content

Instantly share code, notes, and snippets.

View markwbrown's full-sized avatar

Mark Brown markwbrown

View GitHub Profile
#!/bin/bash
RAW_STATUS=$(python3 ~/src/starlink-grpc-tools/dish_grpc_text.py -s 2 status)
STARLINK_CONNECTED=$(echo "$RAW_STATUS" | cut -f 5 -d',')
if [[ "${STARLINK_CONNECTED}" == "CONNECTED" ]]; then
STARLINK_CONNECTED='${color green}'"CONNECTED"'${color}'
elif [[ "${STARLINK_CONNECTED}" == "OFFLINE" ]]; then
STARLINK_CONNECTED='${color red}'"OFFLINE"'${color}'
else
STARLINK_CONNECTED='${color yellow}'"${STARLINK_CONNECTED}"'${color}'

Keybase proof

I hereby claim:

  • I am markwbrown on github.
  • I am oeno (https://keybase.io/oeno) on keybase.
  • I have a public key whose fingerprint is A88A 47A1 CE6C 4616 9113 FD4D 1983 B36A 6F98 2447

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am markwbrown on github.
  • I am oeno (https://keybase.io/oeno) on keybase.
  • I have a public key whose fingerprint is 5F6D 5A00 E16D 1575 2E0B DEFB 6478 EDC6 C74D 384D

To claim this, I am signing this object:

@markwbrown
markwbrown / README.md
Created June 2, 2016 07:45 — forked from brattonc/README.md
D3 Bar Stacker Gauge

A D3 Bar Stacker Gauge with animated filling.

Configurable features include:

  • Configurable minimum and maximum values.
  • Configurable corner rounding.
  • Padding.
  • Color.
  • Horizontal or verticle layout.
  • Text size.
@markwbrown
markwbrown / README.md
Created June 2, 2016 07:44 — forked from brattonc/README.md
D3 Liquid Fill Gauge

Liquid Fill Gauge v1.1 - 7/14/2015

Changes:

  • Added support for updating the gauge value after loading is complete. The loadLiquidFillGauge method now returns an object with an update method which allows the gauge value to be changed. Click any of the gauges above to randomly update their value.

Configurable features include:

  • Changeable min/max values.
  • All colors.

Direction-aware 3D hover effect (Concept)

After seeing this site http://fitzfitzpatrick.com/ I decided to give a try to the "direction-aware hover effect". My first thought was to do it with a pure CSS, not too late I changed my mind and decided to use JS (I need to sleep anyway).

It's kind of simple, using JS we can easily detect the direction the cursor is coming, then, I am using CSS animations for each case (8 in total).

A Pen by Noel Delgado on CodePen.

License.

@markwbrown
markwbrown / rgb2Lab.py
Created March 14, 2016 07:22 — forked from bikz05/rgb2Lab.py
Python Script to convert color from RGB ColorSpace to CIE Lab Color Space
import numpy as np
def func(t):
if (t > 0.008856):
return np.power(t, 1/3.0);
else:
return 7.787 * t + 16 / 116.0;
#Conversion Matrix
matrix = [[0.412453, 0.357580, 0.180423],
import sys
try:
from Polygon import *
except ImportError as e:
print 'Requires Polygon module from https://github.com/jraedler/Polygon2.'
print ''
print 'Try to install as follows:'
print ''
print 'git clone https://github.com/jraedler/Polygon2.git'
@markwbrown
markwbrown / pipista.py
Last active August 29, 2015 14:14 — forked from pudquick/pipista.py
import os, os.path, sys, urllib2, requests
class PyPiError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def _chunk_report(bytes_so_far, chunk_size, total_size):
if (total_size != None):