I hereby claim:
- I am ofalvai on github.
- I am ofalvai (https://keybase.io/ofalvai) on keybase.
- I have a public key whose fingerprint is 36E6 EC06 D9EF 1CF8 07C9 1F50 086A B573 B5E5 2F1F
To claim this, I am signing this object:
#include "esphome.h" | |
#include "driver/rtc_io.h" | |
class CustomSleepComponent : public Component, public CustomMQTTDevice { | |
public: | |
void setup() override { | |
subscribe(TOPIC_SLEEP_DURATION, &CustomSleepComponent::on_sleep_duration_message); | |
subscribe(TOPIC_SLEEP_PREVENT, &CustomSleepComponent::on_prevent_message); | |
subscribe(TOPIC_SLEEP_ENTER, &CustomSleepComponent::on_enter_message); |
import requests | |
from bs4 import BeautifulSoup as bs | |
import re | |
import json | |
CARD_NUMBER = 12345678 | |
CARD_CODE = 678 | |
URL_API = 'https://magan.szepkartya.otpportalok.hu/ajax/egyenleglekerdezes/' | |
URL_HTML = 'https://magan.szepkartya.otpportalok.hu/fooldal/' |
/** | |
* Works on https://www.strava.com/athlete/training | |
* Overwrites all activities on the current page (use the pagination at the bottom!) | |
*/ | |
var SHOE_INDEX = 2; // Starts with 0! | |
jQuery("#search-results tr").each((i, el) => { | |
var shoeSelect = jQuery(el).find("select.shoe-id").get(0); | |
jQuery(shoeSelect).children().eq(SHOE_INDEX).attr("selected", "selected"); | |
jQuery(el).find("button[type='submit']").click(); | |
}) |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
let freq=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)/1000 | |
temp=$(vcgencmd measure_temp) | |
temp=${temp:5} | |
wifi=$(cat /proc/net/wireless | grep wlan0 | awk {'print $4'} | tr -d .) | |
read one five fifteen rest < /proc/loadavg |
# Ide jönnek majd a hasznos snippetek | |
# Whitespace trim: | |
str.strip() | |
# Dict/List rendezése megadott kulcs alapján, pl. az elem hossza | |
sorted(dict, key=lambda x: len(x)) | |
# Dict elemének értéke alapján: | |
sorted(dict, key=lambda x: dict[x]) |