Skip to content

Instantly share code, notes, and snippets.

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const bingoelec_thermostat_floor_sensor_calibration = {
done, booting the kernel.
done decompressing kernel.
start address: 0x8045dc10
Linux version 3.10.90 (xiongbing@embed) (gcc version 4.4.7 (Realtek MSDK-4.4.7 B uild 2001) ) #7 Fri Dec 11 21:31:55 CST 2020
bootconsole [early0] enabled
CPU revision is: 00019385 (MIPS 24Kc)
Determined physical RAM map:
memory: 04000000 @ 00000000 (usable)
Zone ranges:
Normal [mem 0x00000000-0x03ffffff]
#!/bin/bash
echo "ENV loaded"
while IFS="=" read -r key value
do
# skip comments, empty lines
if [ "${key:0:1}" == "#" ] || [ "${key:0:1}" == "" ]; then
continue
fi
@dmitriy-sqrt
dmitriy-sqrt / example.rb
Last active July 30, 2019 20:44 — forked from NARKOZ/example.rb
Задание по рефакторингу
# По стилю
# - компактные декларативные методы с по возможности понятными именами
# - предпочтительно guard`ы вместо ветвления условий
# - одинарные кавычки вместо двойных
# - длинна строки в 100 (минорно, дело вкуса)
# Модели
# - использовать базовый класс ApplicationRecord и от него наследовать модели
# - предпочтительно использовать методы active record вместо sql
# - `with_posts_published` - выглядит не совсем корректным, тут нужно уточнить структуру базы
#!/bin/bash
# run services required for ph work
tab_titles=(\
"ph-core"
"ph-admin"
"ph-web"
"sidekiq"
"opstool-front"
)
<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.chestermatters.news/govt-rss-feed.xml" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#" xmlns:article="http://ogp.me/ns/article#" xmlns:book="http://ogp.me/ns/book#" xmlns:profile="http://ogp.me/ns/profile#" xmlns:video="http://ogp.me/ns/video#" xmlns:product="http://ogp.me/ns/product#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<channel>
<title>Government</title>
<link>https://www.chestermatters.news/govt-rss-feed.xml</link>
<description></description>
<language>en</language>
<atom:link href="https://www.chestermatters.new
@dmitriy-sqrt
dmitriy-sqrt / move_data.rb
Last active September 27, 2018 08:47
Move data for LR
Feature: Process new move
blurb: take from above
Scenario: New move arrives
Given a new move has arrived
When the new move is processed
Then an invite should be sent to the moves residents
Scenario: New move processing creates a Move
Given a new move has arrived
Feature: Process new move
blurb: take from above
Scenario: New move arrives
Given a new move has arrived
When the new move is processed
Then an invite should be sent to the moves residents
Scenario: New move processing creates a xxx
Given a new move has arrived
class TrickyCancel
def initialize(submission = nil)
@submission = submission
@requester_user = User.find(1511)
end
def execute
@submissions = get_submissions
@submissions.each do |submission|
@submission = submission
# Delete missing (deleted/draft) news_items from Budstikka internal articles
# Using 404 amedia response code to identify such articles
newspaper = Newspaper.find(4);
min_news_age = 5.days.ago
news_items_scope = NewsItem.internal.where(newspaper_id: newspaper.id).where("created_at > ?", min_news_age);
duplicated_titles = news_items_scope.group('title').count.select{|k,v| v > 1};