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
/** | |
* Access Flukso API server returning a JSON | |
* | |
*/ | |
function getJSON(sensor, token, query) { | |
var sheetname = "test"; | |
//var aUrl = "http://api.flukso.net/sensor/c1411c6b4f9910bbbab09f145f8533b9?version=1.0&token=d8a8ab8893ea73f768b66b45234b5c3a&interval=month&unit=watt"; | |
var api="1.0"; | |
var aUrl = "http://api.flukso.net/sensor/"+sensor+"?version="+api+"&token="+token+query; | |
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 | |
# current Git branch | |
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
# v1.0.0, v1.5.2, etc. | |
versionLabel=v$1 | |
# establish branch and tag name variables | |
devBranch=develop |
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
while IFS='= ' read var val | |
do | |
if [[ $var == \[*] ]] | |
then | |
section=$var | |
elif [[ $val ]] | |
then | |
declare "$var$section=$val" | |
fi | |
done < ./filename.ini |
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
.DS_Store | |
Thumbs.db | |
db.json | |
*.log | |
node_modules/ | |
public/ | |
.deploy*/ |
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
function setdisplay () | |
{ | |
USERID=$(id -u); | |
# list all connections by numeric (don´t wait slow DNS) | |
# and filter by current user´s listening ports on localhost | |
# that that is in the range of 6000 ~ 6999 (generally X ports) | |
PORTA=$(netstat -ane|grep "LISTEN "|grep "$USERID"|sort -k8n|sed -n -e "s/.*127\.0\.0\.1:6.\(..\) .*/\1/p"|tail -n 1); | |
export DISPLAY="localhost:$PORTA.0" | |
} |