Skip to content

Instantly share code, notes, and snippets.

View dyuri's full-sized avatar
🥋
👊🏻

Gyuri Horak dyuri

🥋
👊🏻
View GitHub Profile
@dyuri
dyuri / gist:513d96d7dc2304f91555d02ee81f9cd6
Created July 23, 2024 09:33
eWeLink ZigBee Gateway (ZB-GW03-V1.2) => tasmota bridge template
{"NAME":"ZB-GW03-V1.2-R","GPIO":[0,0,3552,0,3584,0,0,0,257,256,320,544,5536,0,5600,0,0,0,0,5568,0,0,0,0,0,0,0,0,608,640,32,0,0,0,0,0],"FLAG":0,"BASE":1}
@dyuri
dyuri / fetchcam.py
Created January 26, 2020 16:32
Periodically download images from my IP cameras
import requests
import threading
import time
import os
from PIL import Image, ImageDraw
CAMS = [
{
"url": "http://192.168.123.62/cam.jpg",
"output": "cam1.jpg",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dyuri
dyuri / webglmin.html
Created November 19, 2019 15:25
Minimal webgl shader runner
<canvas id="c" width=400 height=400></canvas>
<script>
var gl = c.getContext("webgl");
var vshader = `void main(){
gl_Position=vec4(0,0,0,1);
gl_PointSize=400.0;
}`;
var fshader = `precision lowp float;
uniform vec3 r;
void main(){

Keybase proof

I hereby claim:

  • I am dyuri on github.
  • I am dyuri (https://keybase.io/dyuri) on keybase.
  • I have a public key ASCDyPQy5adinp2Zi8F6C9HgL0ZOIvM-I0_TWuySu2HthQo

To claim this, I am signing this object:

@dyuri
dyuri / Rainbowize
Created June 30, 2015 09:35
Small bookmarklet to rainbowize any website
javascript:document.styleSheets[0].addRule('body:before','content:\'\';position:fixed;top:0;bottom:0;left:0;right:0;z-index:9999;background:linear-gradient(to bottom,red,yellow,green,cyan,blue,violet);opacity:.4;pointer-events:none;');
import urllib2
import json
import datetime
def find_start_time(datas, identifier):
if 'data' in datas and 'entry' in datas['data'] and 'stopTimes' in datas['data']['entry']:
for stopTime in datas['data']['entry']['stopTimes']:
if stopTime['tripId'] == identifier:
if 'predictedArrivalTime' in stopTime:
return datetime.datetime.fromtimestamp(stopTime['predictedArrivalTime'])
@dyuri
dyuri / hg-scenario1.sh
Last active August 29, 2015 13:59
mercurial scenario 1
#!/bin/bash
# work on dir
mkdir hg-scenario1
cd hg-scenario1
# create repo
hg init
# initial work on trunk