Skip to content

Instantly share code, notes, and snippets.

View Gh61's full-sized avatar

Tomáš Zenkner Gh61

View GitHub Profile
@Gh61
Gh61 / Debounced.cs
Created March 15, 2024 17:21
Class for creating debounced method in C# (includes support for Dispatcher)
using System;
using System.Threading;
using System.Windows.Threading;
namespace Gh61
{
/// <summary>
/// Class for creating debounced variant of given Action, delay for given milliseconds.
/// Every <see cref="Invoke()"/> call will start the delay counting again.
/// </summary>
@Gh61
Gh61 / ExcelClipboard.cs
Created February 15, 2024 16:20
Simple static class, that allows adding metadata for excel when creating clipboard data in C#
// Example:
// var amount = 52163215.23m;
// Clipboard.Clear();
// Clipboard.SetText(amount.ToString());
// ExcelClipboard.SetDataNumber(amount)
public static class ExcelClipboard
{
/// <summary>
/// Returns if the current value is of numeric type.
@Gh61
Gh61 / broadlink_remote_ec0bae6a933d_codes
Last active October 15, 2022 13:58
Logitech Z906 Home Assistant Broadlink Pronto Hex IR Codes
This guide will go over how to install Home Assistant (Supervised) on Rasbian.
Pre-installation Steps
Step 1: Becoming Root
Before we start, you must make sure you are logged in as root, so in order to become root type:
-----------------------------------
sudo su
-----------------------------------
@Gh61
Gh61 / chrome.intellisense.js
Last active October 5, 2023 19:22 — forked from cmc19/chrome.intellisense.js
Visual studio intellisense file for chrome apps and extensions. Generated from latest source code. Manualy added missing properties.
var chrome = {};
chrome.devtools = {};
chrome.declarativeWebRequest = {};
//#region Types
//#region Chrome.AccessibilityObject
chrome.AccessibilityObject = function () {
/// <field name='type' type='string'>The type of this object, which determines the contents of 'details'.</field>
/// <field name='name' type='string'>The localized name of the object, like OK or Password. Do not rely on an exact string match because the text will be in the user's language and may change in the future.</field>
/// <field name='context' type='string'>The localized name of the context for the object, like the name of the surrounding toolbar or group of controls.</field>
/// <field name='details' type=''>Other details like the state, depending on the type of object.</field>