Skip to content

Instantly share code, notes, and snippets.

View jaycollett's full-sized avatar

Jay Collett jaycollett

View GitHub Profile
@jfeilbach
jfeilbach / sysctl.conf.md
Last active March 1, 2024 10:30
10/40 Gb NIC Linux Kernel Performance Tuning for samba file server

TCP tuning

The most important TCP tuning areas since kernel 4.9 are:

  • packet pacing
  • dynamic TSO sizing
  • TCP small queues
  • BBR TCP congestion algorithm

Definitions

  • Gb = gigabit
@pelrun
pelrun / set_state.py
Last active January 30, 2024 08:24
Home Assistant script to set an entity's state, used with the IKEA Tradfri remote control.
if 'entity_id' not in data:
logger.warning("===== entity_id is required if you want to set something.")
else:
data = data.copy()
inputEntity = data.pop('entity_id')
inputStateObject = hass.states.get(inputEntity)
if inputStateObject:
inputState = inputStateObject.state
inputAttributesObject = inputStateObject.attributes.copy()
else: