This file contains hidden or 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
from PyViCare.PyViCare import ViCareOAuthManager | |
from PyViCare.PyViCare import PyViCare | |
from PyViCare.PyViCareGateway import Gateway | |
import json | |
from datetime import datetime | |
import logging | |
_LOGGER = logging.getLogger(__name__) | |
def getPowerConsumption(email, password, client_id): |
This file contains hidden or 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 | |
currentIp=$(ip -6 addr|awk '{print $2}'|grep -P '^(?!fe80)[[:alnum:]]{4}:.*/64'|cut -d '/' -f1) | |
lastIp=$(cat lastip.txt) | |
echo $currentIp | |
echo $lastIp | |
if [ "$currentIp" != "$lastIp" ]; then | |
echo "Updating IP" | |
log=$(curl -X GET "https://<domain>:<password>@<provider>?hostname=<subdomain>&myip=$currentIp") | |
echo $log | |
echo "Saving new IP" |
This file contains hidden or 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 | |
# make sure fast-export is cloned, you have an authors list and you are int the /tmp directory | |
# More: https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git | |
echo converting $1 | |
rm -rf hg-$1 | |
rm -rf git-$1 | |
hg clone ssh://bgiesinger@bitbucket.org/phonicscore/$1 /tmp/hg-$1 |