Skip to content

Instantly share code, notes, and snippets.

@kelvinmo
kelvinmo / ikea-somrig-zigbee2mqtt.yaml
Last active September 7, 2024 12:04
Home Assistant blueprint for Ikea Somrig remote with zigbee2mqtt
blueprint:
name: IKEA Somrig (zigbee2mqtt)
description: Automate Ikea Somrig remote
source_url: https://gist.github.com/kelvinmo/a182de0703ca17bb2259c754db9afe88
domain: automation
input:
remote:
name: Remote
description: The remote to use
selector:
@kelvinmo
kelvinmo / 1380.json
Created July 31, 2022 05:21
SmartIR integration for Midea FS40-10DR fan
{
"manufacturer": "Midea",
"supportedModels": [
"FS40-10DR"
],
"supportedController": "Broadlink",
"commandsEncoding": "Base64",
"speed": [
"on", "quiet", "normal"
],
@kelvinmo
kelvinmo / actuarial.dtx
Created December 9, 2020 00:01
LaTeX style file providing symbols and other notation for actuarial, financial and statistical uses
% \iffalse meta-comment -*- latex -*-
%
% actuarial.dtx. Provides for symbols and other notation for actuarial,
% financial and statistical uses.
%
%% Copyright (C) Kelvin Mo 1999, 2000
%%
%%
% Reference: Bowers L et al, Actuarial Mathematics, Appendix 4
% \fi
@kelvinmo
kelvinmo / fce-thesis.dtx
Created December 8, 2020 23:56
LaTeX document class file for typesetting theses in accordance with style guidelines set by the former Faculty of Commerce and Economics (now the Australian School of Business) at the University of New South Wales
% \iffalse -*- latex -*-
%% Portions Copyright (C) Kelvin Mo 2000
%% This work is based on:
%% - ADFATHESIS.CLS Stephen Harker, School of Physics, ADFA 1994 (public
%% domain)
%% - MONTHESIS.STY Tony McGrath, Dept of Physics, Monash University 1987
%% - REPORT.CLS LaTeX3 Project Copyright (C) LaTeX3 Project 1993, 1994,
%% 1995, 1996, 1997
% \fi
%%
@kelvinmo
kelvinmo / lltxt.rs
Last active February 2, 2021 11:54
Loose-tight text format
//! The loose-tight text format (lttxt)
//!
//! Contains helpers to parse and write to files using this format.
//
//! # Overview
//!
//! The *loose-tight text format* is a loose, semi-structured text file format
//! for simple uses such as configuration files. The format is defined in the
//! [specification](#specification) below.
//!
@kelvinmo
kelvinmo / keybase.md
Created April 2, 2015 08:14
My keybase proof

Keybase proof

I hereby claim:

  • I am kelvinmo on github.
  • I am kelvinmo (https://keybase.io/kelvinmo) on keybase.
  • I have a public key whose fingerprint is 51E6 DA30 DAAB 8830 1D56 CB63 3698 8A58 3138 B972

To claim this, I am signing this object:

@kelvinmo
kelvinmo / s3link-v4.php
Created October 25, 2014 00:17
PHP code to generate a pre-signed URL to access a restricted AWS S3 object