Skip to content

Instantly share code, notes, and snippets.

View CrazyCoder's full-sized avatar

Serge Baranov CrazyCoder

View GitHub Profile
@jorisvervuurt
jorisvervuurt / opnsense-i226-nic-tunables.txt
Last active October 29, 2024 11:54
OPNsense - Intel i226 NIC tunables
<item>
<tunable>net.inet.icmp.drop_redirect</tunable>
<value>1</value>
<descr/>
</item>
<item>
<tunable>net.isr.bindthreads</tunable>
<value>1</value>
<descr/>
</item>
@SavageCore
SavageCore / 1-readme.md
Last active November 9, 2024 09:08 — forked from cdleveille/Install⁄Update Xone
Install or update xone driver for Steam Deck (desktop shortcut and bash script)

Enjoying this script? Consider buying me a beer/coffee!

ko-fi

First time setting up your Deck? You may enjoy my setup guide. It'll get you started on Emulation.

Improvements

Main changes at initial release versus cdleveille's original script:

  • Added zenity for a basic "GUI"
@CrazyCoder
CrazyCoder / zigbee2mqtt_hue_dimmer_v2.yaml
Last active October 13, 2024 11:20
Philips Hue Dimmer switch v2 (Zigbee2MQTT)
blueprint:
name: Philips Hue Dimmer switch v2 (Zigbee2MQTT)
description:
"Tested with Philips Hue Smart Wireless Dimmer Switch V2 (929002398602).
\n\n
To have different actions on short press and on hold (long press), use 'button release' (`*_press_release`) and 'button hold once' (`*_hold_once`) commands,
as 'press' (`*_press`) will always trigger before 'button hold' (`*_hold`).
\n\n
When you hold a button, 'button hold' (`*_hold`) command is repeated roughly once per second. This may not work as desired with actions like toggling light/switch.
If you want an action to run only once when the button hold action is registered, use 'button hold once' (`*_hold_once`). It's better than using 'button hold release'
@CrazyCoder
CrazyCoder / zigbee2mqtt_aqara_wireless_switch.yaml
Last active December 9, 2022 19:14 — forked from rhl2401/zigbee2mqtt_aqara_wireless_switch.yaml
Aqara Wireless Switch (single, double, hold, release)
blueprint:
name: Aqara Wireless Switch (single, double, hold, release)
description: 'Control anything using Aqara Wireless Switch.
Customizable actions for each press.
This version of the blueprint is for buttons supporting single, double, hold and
release actions. '
domain: automation
@Blackshome
Blackshome / sensor-light.yaml
Last active November 2, 2024 08:46
Home Assistant Sensor Light that can be used in Blueprints
blueprint:
name: Sensor Light
description: >
# 💡 Sensor Light
**Version: 7.1**
Your lighting experience, your way - take control and customize it to perfection! 💡✨
@markstos
markstos / md-renderer.html
Last active August 2, 2024 14:20 — forked from vietor/md-renderer.html
Nginx render markdown by browser
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/milligram/1.4.1/milligram.min.css">
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.1.2/styles/github.min.css">
<script type="application/javascript" src="https://cdn.bootcdn.net/ajax/libs/marked/1.1.1/marked.min.js"></script>
<script type="application/javascript" src="https://cdn.bootcdn.net/ajax/libs/highlight.js/10.1.2/highlight.min.js"></script>
<style rel="stylesheet">
body {

How to install Homebrew package manager on Steam Deck

(See also installing Distroboxm, which is included in SteamOS 3.5 and newer: https://distrobox.it/ )
(See also installing Nix package manager: https://determinate.systems/posts/nix-on-the-steam-deck )

You can install Homebrew (a package manager for macOS and Linux) without disabling the read-only partition with sudo steamos-readonly disable.
The package manager can be used alongside Flatpaks. Some software is only available on Flathub, and some software is only available on Homebrew.

  1. Switch to desktop mode (hold power button until a menu appears, then select "Switch to desktop mode")
  2. Click the logo at the bottom left, go to System, then go to Konsole
@rhl2401
rhl2401 / zigbee2mqtt_aqara_wireless_switch.yaml
Last active March 20, 2024 11:46
Aqara Wireless Switch (single, double, hold)
blueprint:
name: Aqara Wireless Switch (single, double, hold, release)
description: 'Control anything using Aqara Wireless Switch.
Customizable actions for each press.
This version of the blueprint is for buttons supporting single, double, hold and
release actions. '
domain: automation
# 1. Open https://link.springer.com/search/page/1?facet-content-type=%22Book%22&package=mat-covid19_textbooks
# 2. Click on the button on the top right of the table to save results into CSV file (SearchResults.csv)
# 3. Run: python springer.py SearchResults.csv
# Note: Python 3 is needed, `pip install requests` if the module is missing
import sys
import csv
import requests
from pathlib import Path
from os import path
@madhead
madhead / springer.py
Created April 30, 2020 20:33
springer.py
import sys
import csv
import requests
from pathlib import Path
if __name__ == '__main__':
with open(sys.argv[1]) as csv_file:
csv = csv.DictReader(csv_file, delimiter=",", quoting=csv.QUOTE_ALL)
next(csv)