Skip to content

Instantly share code, notes, and snippets.

View mrkeuz's full-sized avatar

Mr Keuz mrkeuz

  • Russia, Saint-Petersburg
View GitHub Profile
@gilankpam
gilankpam / epever.yaml
Created December 22, 2023 06:31
ESPHome Epever
esphome:
name: solar-monitor
friendly_name: solar-monitor
platformio_options:
## larger stack size required with all registers enable_load_test
## reduce registers or wait for integration of 2.0.0 arduinoespressif32
## not yet working needs 2.0
build_flags:
- -DCONFIG_ARDUINO_LOOP_STACK_SIZE=32768
@phha
phha / module.yaml
Created May 5, 2020 07:31 — forked from oxan/README.md
Stream server (serial-to-wifi bridge) for ESPHome
esphome:
# ...
includes:
- stream_server.h
- stream_server.cpp
uart:
id: uart_bus
# ...
@varqox
varqox / recording_application_and_microphone.md
Last active March 7, 2024 17:59
How to record multiple applications and microphone into one audio file on Linux using PulseAudio

How to record multiple applications and microphone into one audio file on Linux

Step 0. Terminology

Sinks are for output, sources are for input. To stream source to sink a loopback must be created. More shall you find there.

Step 1. Create output sink that will be recorded

Our output sink will be named recording.

pacmd load-module module-null-sink sink_name=recording sink_properties=device.description=recording
@billimek
billimek / README.md
Last active November 3, 2023 14:25
vault transit auto-unseal

Dual vault servers that unseal each-other with transit seal type

Instructions inspired from auto unseal with transit guide

Prerequisites

  • Docker
  • vault CLI

1. Bootstrap first vault server

import os
import sys
import importlib.abc
import importlib.util
import json
import yaml
ex_registry = []
@591342534
591342534 / SimpleHTTPServerWithUpload.py
Created May 27, 2019 08:13 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@artizirk
artizirk / index.html
Last active September 1, 2022 17:12
Python asyncio websockets http static file server, aka http and websocket server on the same port: python-websockets/websockets#116
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>WebSocket demo</title>
</head>
<body>
<script>
var ws = new WebSocket("ws://127.0.0.1:8765/"),
messages = document.createElement('ul');
@berkayunal
berkayunal / ._ Loading variables from .env files in Ansible.md
Created January 16, 2018 20:42
Loading variables from .env files in Ansible

Loading variables from .env files in Ansible

Ansible has various ways of looking up data from outside sources, including plain text password files, CSV files and INI files. But it doesn't seem to have a lookup for .env files, as used in Laravel projects, also available for PHP, Ruby, Node.js, Python and others.

One option is to launch Ansible with the Ruby dotenv command line script... But that requires Ruby, which seems like overkill to me.

So here is a simpler solution that I use. It consists of:

  1. The .env file itself
  2. A small shell script that loads the .env file into environment variables - ansible-playbook.sh
@mauron85
mauron85 / opt.google.chrome.chrome
Created October 12, 2016 11:19
Google Chrome AppArmor profile for Ubuntu 16.04
# Last Modified: Wed Oct 12 13:00:00 2016
# All credits to:
# https://github.com/detrout/apparmor-det/
# Helpful links:
# https://bugs.dogfood.paddev.net/ubuntu/+source/libvirt/+bug/1386465
# http://blog.azimuthsecurity.com/2012/09/poking-holes-in-apparmor-profiles.html
#include <tunables/global>
@muendelezaji
muendelezaji / bash-to-zsh-hist.py
Created October 5, 2016 14:18 — forked from op/bash-history-to-zsh-history.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time