Skip to content

Instantly share code, notes, and snippets.

View lszeremeta's full-sized avatar

Łukasz Szeremeta lszeremeta

View GitHub Profile
@Staars
Staars / TASMESH.md
Last active March 3, 2025 12:22
WIP driver TASMESH

TAS-MESH

This driver provides the ability to move TASMOTA-devices out of the WLAN by using ESP-NOW to communicate bidirectional with an internal protocol.
Thus the workload for the WLAN-router is reduced and with the reduced overhead the local 2,4-GHz-band will be freed of some traffic. Power consumption of the nodes will be reduced significantly allowing better battery powered projects with TASMOTA. Automatic payload encryption is applied using the WiFi-password1 as the key. A maximum of 32 bytes of this password is used for the ChaCha20Poly1305 authenticated encryption as the key. As ACK/NACK messages seem to be not reliable on both ESP-platforms, the method "send-and-pray" is used.

Working priciple

@fartbagxp
fartbagxp / dig-edns.md
Created October 6, 2019 07:32
Testing eDNS with dig
@pirate
pirate / docker-compose-backup.sh
Last active January 26, 2025 23:38
Backup a docker-compose project, including all images, named and unnamed volumes, container filesystems, config, logs, and databases.
#!/usr/bin/env bash
### Bash Environment Setup
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
# set -o xtrace
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
@ciotlosm
ciotlosm / Readme.md
Last active February 5, 2024 15:04
Kiosk mode for lovelace

Kiosk mode

Installation

Add kiosk.js file with the content below to your www folder in config.

Like any other custom script, use ui-lovelace.yaml resources section to reference the kiosk.js file.

Make sure you add kiosk somewhere in your URL. You can use it in the id of your view or in the query string.

@dvlden
dvlden / ffmpeg.md
Last active January 3, 2025 16:28
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@AgentOak
AgentOak / youtube_formats.md
Last active April 25, 2025 18:04
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@m5wdev
m5wdev / Encapsulation.py
Last active March 31, 2019 20:53
Python 3: Encapsulation, Inheritance, Polymorphism
# Encapsulation
class Human():
# __private - переменная
__privateVar = "this is __private variable"
def __init__(self):
self.className = "Human class constructor"
self.__privateVar = "this is redefined __private variable"
Film Genre Lead Studio Audience score % Profitability Rotten Tomatoes % Worldwide Gross Year
Zack and Miri Make a Porno Romance The Weinstein Company 70 1.747541667 64 $41.94 2008
Youth in Revolt Comedy The Weinstein Company 52 1.09 68 $19.62 2010
You Will Meet a Tall Dark Stranger Comedy Independent 35 1.211818182 43 $26.66 2010
When in Rome Comedy Disney 44 0 15 $43.04 2010
What Happens in Vegas Comedy Fox 72 6.267647029 28 $219.37 2008
Water For Elephants Drama 20th Century Fox 72 3.081421053 60 $117.09 2011
WALL-E Animation Disney 89 2.896019067 96 $521.28 2008
Waitress Romance Independent 67 11.0897415 89 $22.18 2007
Waiting For Forever Romance Independent 53 0.005 6 $0.03 2011
@diegofmp
diegofmp / search.rb
Last active May 21, 2017 20:24
"Advanced search" on rails & will_paginate gem
class Search < ActiveRecord::Base
def search_posts
posts= Post.all
posts= posts.contains_key(keyboards) if keyboards.present?
posts= posts.wSize(size_id) if size_id.present?
return posts
end
end
@dzhuang
dzhuang / strip_comments.py
Last active April 16, 2023 18:14 — forked from amerberg/strip_comments.py
A script to remove comments from LaTeX source
import ply.lex, argparse, io
# modified from https://gist.github.com/amerberg/a273ca1e579ab573b499
#Usage
# python stripcomments.py input.tex > output.tex
# python stripcomments.py input.tex -e encoding > output.tex
# Modification:
# 1. Preserve "\n" at the end of line comment