Skip to content

Instantly share code, notes, and snippets.

View gbit-is's full-sized avatar

Gbit gbit-is

View GitHub Profile
@gbit-is
gbit-is / legofail.py
Created December 25, 2023 12:11
duplo bluetooth attempt
import uasyncio as asyncio
import aioble
import bluetooth
from micropython import const
import time
import struct
print("All aboard")
@gbit-is
gbit-is / arduino_thing_for_hilmar.ino
Created May 14, 2023 13:40
ws2812 arduino example thing
#include <FastLED.h>
//Hversu mörg led í led strippinu
#define NUM_LEDS 60
#define DATA_PIN 13
#define STATIC_LED 12
#define BLINK_LED 11
@gbit-is
gbit-is / main.py
Created April 20, 2023 10:43
grodurhusid
import os
import json
import time
import ipaddress
from analogio import AnalogIn
import wifi
import socketpool
import busio
import board
@gbit-is
gbit-is / compare.py
Created December 10, 2019 11:58
Small python script to compare fields in elasticsearch index template vs elasticsearch indices
#! /usr/bin/python3
import json
# This is not a beutiful piece of code, however it works.
# If you have an elasticsearch index with defined fields in an index template but also dynamic mapping enabled
# you can run into not knowing what dynamic fields exist, which is not a good idea
# so the idea here is to be able to list fields existing in templates and indices and compare them