Skip to content

Instantly share code, notes, and snippets.

View richerve's full-sized avatar

Ricardo Hernandez richerve

  • MongoDB
  • Dublin, Ireland
View GitHub Profile
@XVilka
XVilka / TrueColour.md
Last active July 9, 2024 23:28
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@perrygeo
perrygeo / base64_padding.md
Last active October 25, 2023 16:20
Avoiding TypeError: Incorrect padding with Python's base64 encoding

Avoiding padding errors with Python's base64 encoding

>>> import base64
>>> data = '{"u": "test"}'
>>> code = base64.b64encode(data)
>>> code
'eyJ1IjogInRlc3QifQ=='
@mykwillis
mykwillis / test_thing.py
Last active April 4, 2018 10:58 — forked from jamielennox/test_thing.py
requests_mock and pytest
import thing
import pytest
import requests_mock as rm_module
@pytest.fixture
def requests_mock(request):
with rm_module.Mocker() as m:
yield m
@HarvsG
HarvsG / tradfriZHAhowtos.md
Last active June 25, 2024 11:37
Adding IKEA Tradfri Devices with ZHA on Home Assistant

Shortcut and On/Off switches

  1. Remove back cover with philips scredriver and instert provided battery
  2. In home assistant select a ZHA always-on zigbee device - such as a powered light or signal repeater in the same room the shortcut button will end up in
  3. Select "Add device via this device"
  4. Press the pair button 4 times on the back of the shortcut button
  5. Wait
  6. If using an On/Off switch and you want to bind it to a bulb for non-controller dependant control (i.e will work if home assistant is down)

Pairing On/Off Switches to IKEA Bulbs