Skip to content

Instantly share code, notes, and snippets.

View ekini's full-sized avatar

Eugene Dementyev ekini

View GitHub Profile
esphome:
name: switch_one
platform: ESP8266
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:

Keybase proof

I hereby claim:

  • I am ekini on github.
  • I am ekini (https://keybase.io/ekini) on keybase.
  • I have a public key ASBcXlR-lPL2iv_wRqnq7tgerT8WRmR3afnL2JQc_kTo1wo

To claim this, I am signing this object:

@ekini
ekini / variables.patch
Last active June 25, 2019 22:00
Fixes terraform
From dd541ab89ff6fb870994277cc846d844e9444f41 Mon Sep 17 00:00:00 2001
From: Eugene Dementyev <e@dementyev.me>
Date: Tue, 25 Jun 2019 13:46:10 +1200
Subject: [PATCH] Fixes undefined variables in terraform
---
backend/unparsed_value.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/unparsed_value.go b/backend/unparsed_value.go
@ekini
ekini / example.py
Created August 7, 2012 09:33
example
# extract phone numbers
# firstly, regular expression finds all numbers which can be a number
# then sorted(set(data)) removes duplicates
# then [x for x in arr if "-" in x] takes only numbers which contain "-"
# because most likely, phone number will have it
phones = [x for x in sorted(set(re.findall("\(?[\d]{3}\)?[\s-]?[\d]{3}[\s-]?[\d]{4}", content, re.DOTALL))) if "-" in x]
# if we have emails set and phones, we can process it
if emails and phones:
unique = sorted(set(emails))
@ekini
ekini / icq7contacts.py
Created July 12, 2012 14:40
gets contact info from icq v7
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from cStringIO import StringIO
from struct import unpack
import time
import struct
import pprint
try: