Get BitBar.


EaseE.15m.sh

#!/bin/bash
# <bitbar.title>EaseE</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>ScriptSpry</bitbar.author>
# <bitbar.author.github>scriptspry</bitbar.author.github>
# <bitbar.desc>Just a personal plugin.</bitbar.desc>


echo ":zap:"

echo "---"

echo "my@gmail.com | color=purple href=https://mail.google.com/mail/u/0/"
echo "hi@scriptspry.com | color=purple href=https://mail.google.com/mail/u/1/"

echo "---"

curl -m 1 http://localhost/ -I >/dev/null 2>&1
[ $? -gt 0 ] && echo "✗ - localhost | color=red" || echo "✓ - localhost | color=green href=http://localhost/"

curl -m 1 http://site1.example.com/ -I >/dev/null 2>&1
[ $? -gt 0 ] && echo "✗ - site1 | color=red" || echo "✓ - site1 | color=green href=http://site1.example.com/"

curl -m 1 http://site2.example.com/ -I >/dev/null 2>&1
[ $? -gt 0 ] && echo "✗ - site2 | color=red" || echo "✓ - site2 | color=green href=http://site2.example.com/"

echo "---"

localip=`ipconfig getifaddr en0`
[ $? -gt 0 ] && echo "LAN: Offline | color=red" || echo $localip

ip=`dig +short myip.opendns.com @resolver1.opendns.com 2>/dev/null`
[ $? -gt 0 ] && echo "WAN: Offline | color=red" || echo $ip

echo "---"

echo ":newspaper: HackerNews"

IFS=$'\n' #'# this comment just to not break syntax highlighting below this line
news=`~/bin/hn 2>/dev/null` # see below for the link
if [ $? -eq 0 ]
then
	for item in `~/bin/hn`
	do
		echo "-- $item"
	done
fi

echo "---"

echo ":page_facing_up: Bitbucket"

echo "-- Commits | color=blue href=https://bitbucket.org/XYZ/ABC/commits/all"
echo "-- Pull Requests | color=blue href=https://bitbucket.org/XYZ/ABC/pull-requests/"

echo "---"

echo ":wrench: Utility"

echo "-- JSON Lint | color=orange href=http://jlint/"
echo "-- Blender Documentation | color=orange href=http://bdoc/"
echo "-- Three.js Documentation | color=orange href=http://3doc/docs/"
echo "-- :clock1: Clock | color=orange href=http://clock/"
echo "-- :art: Palette | color=orange href=http://palette/"

echo "---"

echo ":smiling_imp: Time Waste"

echo "-- XKCD | color=violet href=http://xkcd.com/"
echo "-- Facebook | color=violet href=https://www.facebook.com/"
echo "-- DistroWatch | color=violet href=http://distrowatch.com/"
echo "-- StackOverflow | color=violet href=https://stackoverflow.com/"
echo "-- TheCodingLove | color=violet href=http://thecodinglove.com/"

echo "---"

~/bin/hn