Skip to content

Instantly share code, notes, and snippets.

View bkbilly's full-sized avatar
🎃
Let's Build a Better World Together

Vasilis Koulis bkbilly

🎃
Let's Build a Better World Together
View GitHub Profile
/*
*
* Created by bkbilly
* https://github.com/omersiar/RFID522-Door-Unlock/blob/master/EEPROM/EEPROM.ino
*
*
*/
#include <WiFi.h>
#include <ESPmDNS.h>
apt install python3-pip htop lm-sensors
pip3 install --upgrade pip
apt remove python3-wrapt
apt remove python3-scipy
apt install cmake libncurses5-dev libncursesw5-dev git
git clone https://github.com/Syllo/nvtop.git
mkdir -p nvtop/build
cd nvtop/build
cmake ..
[Unit]
Description=Home assistant service for Temperature/Humidity
[Service]
ExecStart=/usr/bin/python3 /opt/remotehomeassistant_dht11.py
WorkingDirectory=/opt/
StandardOutput=inherit
StandardError=inherit
Restart=always
User=pi
@bkbilly
bkbilly / configuration.yaml
Created January 7, 2019 20:44
Home Assistant OASA next bus arrival
sensor:
- platform: oasa
name: "Leave Home Station"
bus: "409"
lat: "37.996364"
lon: "23.792815"
@bkbilly
bkbilly / backup.py
Created January 7, 2019 20:05
Backup files to a directory and then encrypts it
#!/usr/bin/env python3
import subprocess
import sys
import logging
from shutil import copytree, ignore_patterns, rmtree
import os
from subprocess import call
logging.basicConfig(
@bkbilly
bkbilly / readIR.py
Created June 6, 2018 16:43
Convert an IR signal to binary
#! /usr/bin/python3
import time
import subprocess
import re
START = 4000
DIFF = 500
@bkbilly
bkbilly / textinput.py
Last active July 1, 2018 11:01
Google Assistant text input from Terminal. e.g. python3 -m googlesamples.assistant.grpc.textinput_intext --device-id 'my-device-identifier' --device-model-id 'my-model-identifier' --intext 'broadcast dinner time'
# Copyright (C) 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@bkbilly
bkbilly / plot_snmp_interfaces.py
Last active April 23, 2020 10:00
Scans the SNMP tree for all the interfaces and its packet sizes and for every interface plots it into a diagram.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "bkbilly"
from pysnmp.entity.rfc3413.oneliner import cmdgen
from datetime import datetime
import matplotlib.pyplot as plt
import matplotlib.animation as animation
#include <IRremoteESP8266.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#define DEBUG 1
const char* ssid = "";
const char* password = "";
@bkbilly
bkbilly / bulbAlertLinedetection.py
Last active February 27, 2017 15:14
Flash lights for a specific time on the Yeelight when a Line-cross is detected from Hikvision camera.
#!/usr/bin/python
import requests
import re
import threading
import time
import socket
import json
from datetime import datetime
import pytz