This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# v 1.2.2 | |
dir=$(dirname "$0") | |
IFTTTKEY="$(cat $dir/rebootdata.txt | grep IFTTTKEY | cut -f2 -d "=" )" | |
IFTTTrigger="$(cat $dir/rebootdata.txt | grep IFTTTTrigger | cut -f2 -d "=" )" | |
version=$(cat ~/firewalla/net2/config.json | jq '.version') | |
version=${version:=Not Found} | |
OS=$(lsb_release -r | cut -f2) | |
build=$(grep -a "FIREWALLA.UPGRADECHECK.CHECK" /log/firewalla/firelog.log | tail -1 | cut -f12 -d" " | cut -c 1-8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sleep-with-countdown() { | |
secs=$1 | |
while [ $secs -gt 0 ]; do | |
printf "\rsleep: $secs\033[0K" | |
sleep 1 | |
: $((secs--)) | |
done | |
printf "\n" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Varibles | |
OS="$(uname -s | sed -e 's/Darwin/macos/g')" | |
MUSER=$(echo $USER | tr '[:upper:]' '[:lower:]' | awk '{for (i=1;i<=NF;i++) $i=toupper(substr($i,1,1)) substr($i,2)} 1') | |
MACH=$(hostname -s) | |
PATH=$LOCATION:$PATH | |
UA="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.80 Safari/537.36" | |
MKDIR="mkdir -p" | |
LOCATION=$(dirname $0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Based on Sam Dutton's script (http://goo.gl/27XlZ) | |
-- which was based on Mike Piontek's script (http://goo.gl/SBkkL) | |
-- This is Chrome specific. See https://gist.github.com/3232318 for a Safari Script | |
tell application "TextWrangler" to set theFile to file of document 1 | |
tell application "TextWrangler" to save document 1 | |
set appleScriptPath to theFile as text | |
set currentURL to POSIX path of appleScriptPath | |
set currentURL1 to POSIX path of appleScriptPath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe src="https://apigee.com/embed/console/twitter?v=2" height="100%" width="100%" scrolling="no"></iframe> | |
<!-- | |
How to make an embedded Apigee API v2 Console | |
Simply go to https://apigee.com/togo and create a console. Then, you'll get an iframe code similar to the one above with your Console and you can embed anywhere you like. | |
The "?v=2" is a new way to get the latest Apigee Console. More details to come! | |
--> |