(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| blueprint: | |
| name: Aqara TRV E1 External Temperature Control | |
| description: > | |
| This automation allows the Aqara TRV E1 Smart Radiator Thermostat to use temperature readings from an external sensor rather than its internal sensor. Whenever the temperature sensor reports a new value, it is sent to the TRV for more accurate climate control. | |
| domain: automation | |
| source_url: "https://gist.github.com/pavax/8d6ed250765d89cb281d4a1762b8d2e8" | |
| input: | |
| external_temp_sensor: | |
| name: External Temperature Sensor |
| blueprint: | |
| name: Synchronizuj temperaturę TRV | |
| description: Synchronizuj temperaturę zewnętrznego czujnika z temperaturą TRV | |
| domain: automation | |
| input: | |
| ieeeaddressoftrv: | |
| name: Adres IEEE | |
| description: To jest adres TRV znaleziony w Twojej bazie danych Zigbee, na przykład 0x459877fffe1f2e83 | |
| external_temp: | |
| name: Wybierz zewnętrzny czujnik temperatury |
| <?xml version="1.0"?> | |
| <profile name="Original Prusa i3 MK2" version="2017-01-08 12:52:09" app="S3D-Software 3.1.1"> | |
| <baseProfile>Default</baseProfile> | |
| <printMaterial>PLA</printMaterial> | |
| <printQuality>Optimal</printQuality> | |
| <printExtruders></printExtruders> | |
| <extruder name="Primary Extruder"> | |
| <toolheadNumber>0</toolheadNumber> | |
| <diameter>0.4</diameter> | |
| <autoWidth>0</autoWidth> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // | |
| // APIWrapper+Generic.swift | |
| // OPTIFY | |
| // | |
| // Created by Tomas Sykora, jr. on 12/09/2016. | |
| // Copyright © 2016 AJTY, s.r.o. All rights reserved. | |
| // | |
| import RealmSwift | |
| import Alamofire |
| protocol APIProtocol { | |
| init(_ j: [String: Any]) | |
| } | |
| extension APIWrapper { | |
| func getAllObjectsOf<T: APIProtocol>(type: T.Type, request: URLRequestConvertible, _ completion: @escaping (_ result: (T.Type, ResultState)) -> Void) { | |
| Alamofire.request(request).validate().response { response in | |
| do { | |
| if let data = response.data { |
| SET FOREIGN_KEY_CHECKS = 0; | |
| SET @tables = NULL; | |
| SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables | |
| FROM information_schema.tables | |
| WHERE table_schema = 'schema_name'; -- specify DB name here. | |
| SET @tables = CONCAT('DROP TABLE ', @tables); | |
| PREPARE stmt FROM @tables; | |
| EXECUTE stmt; | |
| DEALLOCATE PREPARE stmt; |
| // | |
| // GenericRealmTableViewController.swift | |
| // WICS | |
| // | |
| // Created by Tomas Sykora, jr. on 16/06/16. | |
| // Copyright © 2016 AJTY, s.r.o. All rights reserved. | |
| // | |
| import UIKit | |
| import SwiftFetchedResultsController |
| #!/bin/bash | |
| # Mount the installer image | |
| hdiutil attach /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
| # Create the ElCapitan Blank ISO Image of 7316mb with a Single Partition - Apple Partition Map | |
| hdiutil create -o /tmp/ElCapitan.cdr -size 7316m -layout SPUD -fs HFS+J | |
| # Mount the ElCapitan Blank ISO Image | |
| hdiutil attach /tmp/ElCapitan.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build |
| # xcode-build-bump.sh | |
| # @desc Auto-increment the build number every time the project is run. | |
| # @usage | |
| # 1. Select: your Target in Xcode | |
| # 2. Select: Build Phases Tab | |
| # 3. Select: Add Build Phase -> Add Run Script | |
| # 4. Paste code below in to new "Run Script" section | |
| # 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
| # 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |