This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const templateList = document.querySelectorAll(`template`); | |
const central = document.querySelector(`.central`); | |
const templateShow = function (templateNumber) { | |
const newNode = templateList[templateNumber].content.cloneNode(true); | |
central.innerHTML = ``; | |
central.replaceChild(newNode, oldNode); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
(function () { | |
var WIZARD_NAMES = ['Иван', 'Хуан Себастьян', 'Мария', 'Кристоф', 'Виктор', 'Юлия', 'Люпита', 'Вашингтон']; | |
var WIZARD_LASTNAMES = ['да Марья', 'Верона', 'Мирабелла', 'Вальц', 'Онопко', 'Топольницкая', 'Нионго', 'Ирвинг']; | |
var WIZARD_COATCOLORS = ['rgb(101, 137, 164)', 'rgb(241, 43, 107)', 'rgb(146, 100, 161)', 'rgb(56, 159, 117)', 'rgb(215, 210, 55)', 'rgb(0, 0, 0)']; | |
var WIZARD_EYESCOLORS = ['black', 'red', 'blue', 'yellow', 'green']; | |
var FIREBALL_COLORS = ['#ee4830', '#30a8ee', '#5ce6c0', '#e848d5', '#e6e848']; | |
var setup = document.querySelector('.setup'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
ROOT=$1 | |
PATTERN=$2 | |
walkdir() { | |
CUR_DIR=$1 | |
pushd $CUR_DIR > /dev/null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/fleet.service | |
[Unit] | |
After=etcd.service etcd2.service etcd-member.service | |
Wants=network.target fleet.socket | |
Requires=etcd-member.service | |
Requires=skydns.service | |
[Service] | |
Type=simple | |
Restart=always | |
RestartSec=10s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// arduinoESP8266 wifi & eeprom setting template | |
// ----------------------------------- libs ----------------------------------- | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266HTTPClient.h> | |
#include <ESP8266httpUpdate.h> | |
#include <EEPROM.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import subprocess | |
import time | |
from os import walk, path, chdir | |
import re | |
regex = re.compile(r'([0-9a-f]+)_(\w+)\.py') | |
date_re = re.compile(r'(\d+)-(\d+)-(\d+) (\d+):(\d+)') | |
chdir('/Users/h4/Projects/Arrival/components-catalogue/alembic/versions') | |
for root, dirs, files in walk('/Users/h4/Projects/Arrival/components-catalogue/alembic/versions'): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[76, 89, 87, 83, 68, 48, 50] | |
[0, 0] | |
[1, 0, 255, 255] | |
[109, 105, 97, 111, 109, 105, 97, 111, 99, 101, 46, 99, 111, 109] | |
[76, 89, 87, 83, 68, 48, 50] | |
[70, 50, 48, 48, 70, 70, 70, 70, 48, 50, 52, 51, 53, 54, 57, 48, 53, 67] | |
[70, 50, 95, 87, 70] | |
[49, 46, 49, 46, 50, 95, 48, 48, 49, 57] | |
[48, 48, 49, 57] | |
[190, 112, 128, 200, 89, 63] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Service: 00001800-0000-1000-8000-00805f9b34fb | |
Characteristic: 00002a00-0000-1000-8000-00805f9b34fb | |
READ | |
b'LYWSD02' | |
Characteristic: 00002a01-0000-1000-8000-00805f9b34fb | |
READ | |
b'\x00\x00' | |
Service: 00001801-0000-1000-8000-00805f9b34fb | |
Characteristic: 00002a05-0000-1000-8000-00805f9b34fb | |
READ INDICATE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Service: 00001800-0000-1000-8000-00805f9b34fb | |
Characteristic: 00002a00-0000-1000-8000-00805f9b34fb | |
READ WRITE | |
b'MJ_HT_V1' | |
Characteristic: 00002a01-0000-1000-8000-00805f9b34fb | |
READ | |
b'\x00\x03' | |
Characteristic: 00002a04-0000-1000-8000-00805f9b34fb | |
READ | |
b'\x10\x00<\x00\x00\x00\x90\x01' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensor: | |
- platform: template | |
sensors: | |
livingroom_battery: | |
friendly_name: "Humid Battery Level" | |
value_template: "{{ states.sensor.humidity_158d00020ec3e3.attributes.battery_level }}" | |
unit_of_measurement: '%' |