Skip to content

Instantly share code, notes, and snippets.

View syky27's full-sized avatar
🏍️
Wheeeelie!

Tomas Sykora, jr. syky27

🏍️
Wheeeelie!
View GitHub Profile
@syky27
syky27 / z2m_aqara_trv_external_temperature.yaml
Created January 7, 2025 14:36 — forked from pavax/z2m_aqara_trv_external_temperature.yaml
z2m_aqara_trv_external_temperature.yaml
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
@syky27
syky27 / sync_trv.yaml
Created January 7, 2025 14:34 — forked from kuchar91/sync_trv.yaml
[Blueprint] Sync TRV with external temp
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
@syky27
syky27 / Original Prusa i3 MK2.fff
Created March 24, 2017 12:54 — forked from cubiq/Original Prusa i3 MK2.fff
Simplify3D Configuration file for the Original Prusa i3 MK 2
<?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>
@syky27
syky27 / introrx.md
Created March 20, 2017 12:09 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@syky27
syky27 / APIWrapper+Generic.swift
Created February 28, 2017 14:58
Realm + API + Generics
//
// 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
@syky27
syky27 / realm_generic_network.swift
Last active February 14, 2018 13:01
REALM Generic data fetch
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 {
@syky27
syky27 / utimate_drop.sql
Created November 15, 2016 22:47
DROP ALL TABLES IN MYSQL
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;
@syky27
syky27 / GenericRealmUITableViewController.swift
Created June 17, 2016 22:10
SwiftFetchedResultsController Generic UITableViewController
//
// 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
@syky27
syky27 / ElCapitanToISO.sh
Created March 14, 2016 16:06
Create ISO from El Capitan downloaded from App Store
#!/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)