Skip to content

Instantly share code, notes, and snippets.

View nediam's full-sized avatar

Bartłomiej Kuleszewicz nediam

View GitHub Profile
var object = msg.payload;
msg.payload = {
"data": {
"title": "Śmieci",
"message": null
}
};
var translations = {"rest": "Zmieszane","glass": "Szkło","paper": "Papier","plastic": "Plastik","bio": "Bio","green": "Zielone","bulk": "Gabaryty"};
{% set days_translation = ["Poniedziałek","Wtorek","Środa","Czwartek","Piątek", "Sobota","Niedziela"] %}
{% set trash_translation = {"rest": "Zmieszane","glass": "Szkło","paper": "Papier","plastic": "Plastik","bio": "Bio","green": "Zielone","bulk": "Gabaryty"} %}
{% set trash = states('sensor.trash')|from_json %}
{% for item in trash %}
{%- set date = trash[item] -%}
{%- set days_to = (((as_timestamp(strptime(date, '%Y-%m-%d'))-as_timestamp(now()))/86400))|round(0,'ceil')-%} **{{ trash_translation[item] }}:** {{ days_to }} dni *({{ days_translation[strptime(date, '%Y-%m-%d').weekday()] }})*
{% endfor %}
- platform: mqtt
state_topic: '/homeassistant/trash'
name: trash
- platform: rest
name: trash
resource: http://nediam.pl/lekaro/ha.php
json_attributes:
- rest
- glass
- paper
- plastic
- bio
- green
[
{
"id": "a5600024.e914",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "c965f380.9fc4b",
<?php
$a = range(0,9);
$b = new ArrayIterator($a);
foreach($b as $k=>$v) {
$b->offsetUnset($k);
}
var_dump($b->getArrayCopy());
Witam mam problem z typami płatności zwracanymi przez metodę
doGetPostBuyFormsDataForSellers, mianowicie w polu
"post-buy-form-pay-type" dostaję wartość
"tt" któej nie ma w oficjalnej dokumentacji
na stronie
http://www.payu.pl/sites/default/files/regulaminy_i_pliki/Dokumentacja_techniczna_systemu_PayU.pdf
czy mogę dostać aktualną listę metod płatności?
---------
var getParams = (function () {
var e,
d = function (s) {
return decodeURIComponent(s).replace(/\+/g, " ");
},
q = window.location.search.substring(1),
r = /([^&=]+)=?([^&]*)/g,
urlParams = {};
while (e = r.exec(q)) {
$con = \Propel::getConnection(AddressPeer::DATABASE_NAME);
$query = $con->getLastExecutedQuery();
for i in `seq 1 30`; do php import_google_analytics_data.php $i; done