Skip to content

Instantly share code, notes, and snippets.

View silpol's full-sized avatar
🏠
Email is best comm tool.

Andriy Tymchenko silpol

🏠
Email is best comm tool.
View GitHub Profile
@bruvv
bruvv / sync_trv_with_external_temp_sensor.yaml
Last active February 8, 2024 20:05
Sync TRV with external sensor blueprint
blueprint:
name: Sync TRV temperature
description: Sync external temperature sensor with TRV temperature
domain: automation
input:
ieeeaddressoftrv:
name: IEEE Address
description: This is the address of the TRV found in your zigbee database example 0x459877fffe1f2e83
external_temp:
name: Select the external temp sensor
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 10, 2024 20:23
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@artizirk
artizirk / gnupg_scdaemon.md
Last active April 3, 2024 14:49
OpenPGP SSH access with Yubikey and GnuPG

NB: This document describles a 'Old-School' way of using Yubikey with SSH

Modern OpenSSH has native support for FIDO Authentication. Its much simpler and should also be more stable with less moving parts. OpenSSH also now has support for signing arbitary files witch can be used as replacement of gnupg. Git also supports signing commits/tags with ssh keys.

Pros of FIDO

  • Simpler stack / less moving parts
  • Works directly with ssh, ssh-add and ssh-keygen on most computers
  • Simpler
  • Private key can never leave the FIDO device

Cons of FIDO

@jeromew21
jeromew21 / firefoxheadless.py
Last active March 4, 2021 19:06
[Python] Start Selenium Firefox driver in headless (invisible) mode.
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
options = Options()
options.set_headless(True)
binary = FirefoxBinary("/usr/bin/firefox") #Linux. In Windows/Mac this is different
driver = webdriver.Firefox(firefox_options=options, firefox_binary=binary)
print("started firefox in headless mode")
@vdparikh
vdparikh / server.py
Last active February 25, 2021 19:58
Python JSONRPC and HTTP with Flask
from flask import Flask, request, Response
from jsonrpcserver import methods
import os
app = Flask(__name__)
# JSON RPC Methods
@methods.add
def ping():
return 'pong'
@FollowMeDown
FollowMeDown / debian-source-pkg-build.txt
Last active April 4, 2024 22:30
How to create debian package from source
In any GNU/Linux distribution, which have a package manager on board, is recommended to install software by using "packages".
Building from source
Step 1. GPG key
The first thing you need is generate a gpg key.
Package will be signed by this key.
Run this commands in your terminal:
@sampaiodiego
sampaiodiego / Install Lets Encrypt.md
Last active December 16, 2017 16:57
Steps to install Letsencrypt
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active April 15, 2024 02:19
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

==========================
How Software Companies Die
==========================
- Orson Scott Card
The environment that nurtures creative programmers kills management and
marketing types - and vice versa.
Programming is the Great Game. It consumes you, body and soul. When
you're caught up in it, nothing else matters. When you emerge into