Skip to content

Instantly share code, notes, and snippets.

View dkaukov's full-sized avatar

Dmitry Kaukov dkaukov

  • OpenTable
  • Australia
View GitHub Profile
@daleyjem
daleyjem / eval.js
Created December 1, 2015 18:58
Handlebars Eval Helper
/**
* Evalutes a given expression by taking in a hash of variables as input values.
* ${variable} denotes a variable assigned in the hash.
*
* Example:
* {{eval "${a} + ${b}" a=1 b=2}}
* = 3
*/
module.exports.register = function(Handlebars, options) {
Handlebars.registerHelper('eval', function(expr, options) {
@okapies
okapies / t470s.md
Last active October 28, 2021 16:45
Ubuntu 16.04 on ThinkPad T470s

This is a document describing how to install Ubuntu 16.04 LTS on ThinkPad T470s.

My Hardware

  • CPU: Intel Core i7-7600U (2.80GHz, 4MB cache)
  • Graphics: Intel HD Graphics 620
  • Display: 14” WQHD (2560 X 1440) IPS Non-Touch Anti-Glare
  • Memory: 24GB DDR4 2133 MHz (8GB Onboard + 16GB)
  • SSD: PCIe-NVMe 256G OPAL 2.0
  • Wireless: Intel Dual Band Wireless AC (2x2) 8265 Bluetooth 4.1
  • Fingerprint Reader
@placidorevilla
placidorevilla / tuyadimmer_lightoutput.h
Last active July 13, 2020 12:15
Prototype esphome component for Tuya Dimmer
#pragma once
#include "esphome.h"
using namespace esphome;
enum TuyaCmd : uint8_t {
HEARTBEAT = 0x00,
QUERY_PRODUCT = 0x01,
MCU_CONF = 0x02,
WIFI_STATE = 0x03,