Skip to content

Instantly share code, notes, and snippets.

@pavelbinar
pavelbinar / README.md
Created July 30, 2026 08:46
ESPHome SEN66 update using the built-in sen6x component

SEN66 update for ESPHome 2026.7

The previous configuration used uELKO/esphome_external_components, which no longer compiles because ESPHome 2026.7 removed an API it depended on.

The updated configuration:

  • Uses ESPHome's built-in sen6x component.
  • Correctly treats PM1, PM2.5, PM4 and PM10 as cumulative values.
  • Removes the custom PM10 sum and unreliable custom IAQ calculation.
  • Keeps TVOC and CAQI explicitly labelled as estimates.

HP LaserJet P1102 Drivers for macOS Sequoia

This instructions provides a solution for installing HP LaserJet P1102 drivers on macOS Sequoia (15.0+). The official HP drivers don't install on the latest macOS versions, but with a simple modification to bypass the operating system version check, you can get your printer working again.

Supported Printer Models

  • HP LaserJet P1102
  • HP LaserJet Pro P1102
  • HP LaserJet Pro P1102w

Jak Získat Procentuální Skóre ze Stránky https://klient.kolikmam.cz/Home/Rating

Pokud chcete zjistit procentuální hodnocení uvedené na stránce https://klient.kolikmam.cz/Home/Rating, můžete použít tento JavaScriptový kód. Stačí jej zkopírovat a vložit do konzoly ve vašem webovém prohlížeči. Zde je postup pro různé prohlížeče

Kód

Verze v češtině s popisem

(function() {
@pavelbinar
pavelbinar / application-layout.html
Last active February 6, 2023 10:38
Slack like layout done in Tailwindcss
<!-- Example: https://play.tailwindcss.com/Q2pbgywiES -->
<div class="flex h-screen">
<div class="h-full w-16 bg-gray-200 p-4">Sidebar 1</div>
<div class="h-full w-48 bg-gray-300 p-4">Sidebar 2</div>
<div class="h-full flex-1 bg-yellow-300 p-4 overflow-auto">
<h1 class="text-4xl">Content</h1>
<p class="my-10">Lorem ipsum dolor sit amet consectetur adipisicing elit. Corrupti perspiciatis molestias adipisci eius fugit voluptatem dicta minima dolores, expedita repellat illo eligendi iure possimus assumenda, tenetur ab. Ea eaque sint dolore dolor commodi ut repudiandae accusantium nemo dolores quo reiciendis nihil, quae suscipit modi vitae eos molestiae. Cumque soluta, provident, earum laudantium beatae temporibus perspiciatis vitae pariatur quam ea fugit libero culpa placeat autem quisquam porro dolore dicta quasi animi tenetur aspernatur odit consectetur sed? Corrupti magni culpa officiis alias quo, nam ut laudantium ab illum perspiciatis vero placeat maxime corporis iure illo quod omnis quidem e
@pavelbinar
pavelbinar / index.html
Created June 17, 2020 13:31
Dynamically add script tag with unique src
<script>
var now = new Date().getTime();
var newScript = document.createElement("script");
newScript.src = "<%= htmlWebpackPlugin.options.mainURL %>?t=" + now;
var target = document.getElementsByTagName("body")[0];
target.appendChild(newScript);
</script>
@pavelbinar
pavelbinar / delete-all-node-modules.md
Last active April 25, 2024 11:58
Delete all node_modules folders

Delete all node_modules folders

Recursively delete all node_modules folders nested in the current folder.

find . -name "node_modules" -type d -prune -exec rm -rf '{}' +

Since many node_modules contain another node_modules it is more effective to delete just top level folder. use -maxdepth 2 to limit that depth. Adjust according to your foldr structure.

function color_my_prompt {
local __user_and_location="\n\[\e[32;1m\](\[\e[37;1m\]\u\[\e[32;1m\])-(\[\e[37;1m\]\w\[\e[32;1m\])"
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`'
local __prompt="\n$\[\e[0m\]"
export PS1="$__user_and_location $__git_branch $__prompt "
}
color_my_prompt
@pavelbinar
pavelbinar / add-key.sh
Created May 24, 2017 15:23
Add Public SSH Key to Remote Server in a Single Command
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'
sudo fdisk -l
sudo dd if=ubuntu-17.04-beta2-desktop-amd64.iso of=/dev/sdb bs=512k