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 June 24, 2024 12:23
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 June 25, 2024 18:31 — 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 June 3, 2024 18:59
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 June 26, 2024 11:33
Home Assistant Sensor Light that can be used in Blueprints
blueprint:
name: Sensor Light
description: >
# 💡 Sensor Light
**Version: 6.9**
Your lighting experience, your way - take control and customize it to perfection! 💡✨

How to install Homebrew package manager on Steam Deck

(See also installing Distrobox: 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)
@nerzhulart
nerzhulart / Windows Defender Exclusions for Developer.ps1
Last active June 13, 2024 17:57 — forked from dknoodle/Windows Defender Exclusions VS 2017.ps1
Adds Windows Defender exclusions for developers (Visual Studio, JetBrains Rider, IntellIJ Idea, Git, MsBuild, dotnet, mono etc.)
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null
$pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null
$pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio 14.0') > $null