Skip to content

Instantly share code, notes, and snippets.

@artkrz
artkrz / hass_influx_drop_mesurments.sh
Last active February 21, 2024 16:32
Remove measurements from HASS InfluxDB
#!/bin/bash
host=localhost
db='home_assistant'
measurements=$1
measurements=($(influx --host $host --execute 'show measurements' --database=$db | grep "$1"))
if (( ${#measurements[@]} ))
then

Ubuntu 16.04 Installation:

Installing prerequisites

sudo su
apt-get update
apt-get install default-jdk
@BoGnY
BoGnY / README.md
Last active June 25, 2024 18:15
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)

Requirements

  • Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
  • Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell (Make sure your local version of Git is at least 2.0, otherwise Git don't have support for automatically sign your commits)
  • Verify
@dschep
dschep / raspbian-python3.6.rst
Last active October 24, 2023 14:57 — forked from BMeu/raspbian-python3.5.rst
Installing Python 3.6 on Raspbian

Installing Python 3.6 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).
@nairteashop
nairteashop / mjpeg-server.py
Created November 11, 2013 04:37
A simple Motion JPEG server in python for creating "virtual cameras" from video sequences.
#!/usr/bin/python
#
# A simple Motion JPEG server in python for creating "virtual cameras" from video sequences.
#
# The cameras will support MJPEG streaming over HTTP. The MJPEG streams are formed from static JPEG images.
# If you wish to stream a video file, use a tool like VirtualDub to break the video into a sequence of JPEGs.
#
# The list of cameras should be defined as a series of entries in a file named 'mjpeg-server.conf', with
# each entry having the following format: