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
if [ $(file /boot/vmlinuz* | cut -d ' ' -f 9) != $(uname -r) ] ; then echo 'reboot'; else echo 'ok'; fi |
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
#!/usr/bin/python3 | |
import os | |
import re | |
os.chdir('/boot') | |
files=(os.listdir('/boot')) | |
keep = [ |
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
#!/usr/bin/python3 | |
import os | |
tmp = os.popen('uname -r') | |
kernelO = tmp.read() | |
kernelO = kernelO.replace('-x86_64', '').strip() | |
tmp = os.popen('eselect kernel list | grep [1] | cut -d " " -f 6') | |
kernelN = tmp.read() | |
kernelN = kernelN.replace('linux-', '').strip() |
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
import datetime | |
import urllib.request | |
import json | |
weeknr = datetime.date.today().strftime("%V") | |
year = datetime.date.today().strftime("%Y") | |
url = "https://energy-charts.info/charts/power/data/de/week_"+year+"_"+weeknr+".json" | |
data = urllib.request.urlopen(url).read() | |
data = json.loads(data) |
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
<?php | |
$mysql_serv = 'localhost'; | |
$mysql_user = 'usblogger'; | |
$mysql_pass = 'usblogger'; | |
$mysql_datb = 'volkszaehler'; | |
$uuid_v = 1; | |
$uuid_a = 2; | |
?> |
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
#!/usr/bin/python | |
import redis | |
import pickle | |
import argparse | |
class RedisMigrate(): | |
def __init__(self, host, port, db): |
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
#define BLINK_DELAY 100 //ms between blinks | |
#define BLINK_PAUSE 3 //3x DELAY for pause | |
void blinkDigit(byte digit) { | |
for(byte i=0; i<digit; i++) { | |
digitalWrite(LED_BUILTIN, HIGH); | |
delay(BLINK_DELAY); | |
digitalWrite(LED_BUILTIN, LOW); | |
delay(BLINK_DELAY); | |
} |
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
/*************************************************************************** | |
IR Ferraris Reader | |
2019 Adlerweb//Bitbastelei | |
Florian Knodt - www.adlerweb.info | |
Note: Just a few minutes of coding, not heavily tested, etc | |
***************************************************************************/ | |
#include <Arduino.h> |
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
<?php | |
/* | |
Usage: | |
- platform: command_line | |
name: foo | |
command: "php -f /home/homeassistant/vzapi.php 1" | |
unit_of_measurement: "W" | |
Todo: | |
- Rewrite in Python |
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
#include <LEDMatrixDriver.hpp> | |
extern "C" { | |
#include "user_interface.h" | |
} | |
// This sketch draw marquee text on your LED matrix using the hardware SPI driver Library by Bartosz Bielawski. | |
// https://github.com/bartoszbielawski/LEDMatrixDriver | |
// Example written 16.06.2017 by Marko Oette, www.oette.info |