Skip to content

Instantly share code, notes, and snippets.

View ttrushin's full-sized avatar

Tyler Trushin ttrushin

View GitHub Profile
@ttrushin
ttrushin / Debouncer.cs
Created December 30, 2019 18:24 — forked from pmunin/Debouncer.cs
Action Debouncer for C#
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel;
using System.Timers;
namespace DebounceUtils
{
/// <summary>
/// Event debouncer helps to prevent calling the same event handler too often (like mark Dirty or Invalidate)
@ttrushin
ttrushin / keyping.go
Created May 31, 2019 01:37 — forked from zmanian/keyping.go
Key Pinning in #Golang
package main
import (
"bytes"
"crypto/sha256"
"crypto/tls"
"crypto/x509"
"log"
"net"
"net/http"
@ttrushin
ttrushin / mqtt_export.py
Created February 20, 2018 19:51 — forked from darookee/mqtt_export.py
Export Home Assistant state changes to MQTT #HomeAssistant
"""
MQTT publisher for all Home Assistant states.
Copyright (c) 2016 Fabian Affolter <fabian@affolter-engineering.ch>
Licensed under MIT
For questions and issues please use https://community.home-assistant.io
To use this component you will need to add something like the
following to your configuration.yaml file.
@ttrushin
ttrushin / IKScrollView.swift
Created February 20, 2018 19:48 — forked from IanKeen/IKScrollView.swift
A UIScrollView subclass that allows you to use scrollviews and autolayout without the drama... #Swift
enum SizeMatching {
case Width, Height, Both, None
}
class IKScrollView: UIScrollView {
//MARK: - Outlets
@IBOutlet private var contentView: UIView?
//MARK: - Properties
@IBInspectable var sizeMatching = SizeMatching.Width