Skip to content

Instantly share code, notes, and snippets.

View vooon's full-sized avatar
🚴‍♂️
Working from home

Vladimir Ermakov vooon

🚴‍♂️
Working from home
View GitHub Profile
# Config for Xiaomi MJXDD01YL Ceiling lamp
# modified to have esp32 instead of mediatek chip.
#
# Based on: https://github.com/syssi/esphome-yeelight-ceiling-light
# See: https://github.com/syssi/esphome-yeelight-ceiling-light/issues/10
---
substitutions:
uname: Room2 Ceiling Light
device_name: room2-ceiling-light
friendly_name: $uname
@vooon
vooon / octoprint.service
Created June 27, 2018 10:10
Octoprint unit file for running on Orange Pi with Armbian 5
[Unit]
Description=OctoPrint
After=network.target
[Service]
User=max
ExecStart=/home/max/octoprint/venv/bin/octoprint serve
Restart=always
[Install]
@vooon
vooon / ZRIB-Repetier-Configuration.h
Last active November 30, 2017 19:04
Zonestar P802QSA ZRIB Repetier configuration (optical endstop).
/*
This file is part of Repetier-Firmware.
Repetier-Firmware is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Repetier-Firmware is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@vooon
vooon / rpi3-v7-v8.md
Last active June 26, 2017 20:13
Raspberry Pi3 running ARMv7 and ARMv8 LEDE

LEDE master (f33de802) compilled in armhf and aarch64 modes.

Test: https://github.com/bitbank2/gcc_perf

Test v7 [ms] v8 [ms] delta %
Combine Masks C (bigger than cache) 3308 3331 -23 99,31%
Combine Masks C (smaller than cache) 1453 1203 250 120,78%
Combine Masks SIMD (bigger than cache) 3269 3384 -115 96,60%
Combine Masks SIMD (smaller than cache) 1044 769 275 135,76%
@vooon
vooon / run-sync.sh
Created June 6, 2017 08:06
Howto run syncthing on Android 2.3 (on Onyx Boox C63ML)
#!/bin/sh
#
# 1. download Syncthing for Linux ARM
# 2. Install: https://play.google.com/store/apps/details?id=jackpal.androidterm
# 3. Put syncthing-arm to device SD card
#
# run: source /sdcard/runsync
#
# location of treminal folder
@vooon
vooon / ttyping.cc
Created June 22, 2016 13:16
Quick and dirty TTY ping
/* Simple ping-pong test for TTY
*
* Depends on: Boost.ASIO and docopt.cpp
* https://github.com/docopt/docopt.cpp.git
*
* Complie:
g++ -std=c++14 -pthread ttyping.cc -o ttyping -lboost_system -static -I/usr/local/include -ldocopt
* Testing socat:
@vooon
vooon / ws2812b.h
Created March 13, 2016 22:19
Code snippet of WS2812b smart led driver for STM32F373 & ChibiOS
#pragma once
typedef struct {
uint8_t r;
uint8_t g;
uint8_t b;
} rgb_t;
void wsInit(void);
@vooon
vooon / yandex-ddns.sh
Last active November 20, 2015 09:56
Dynamic DNS updater script for Yandex DNS service
#!/bin/sh
#set -x
# Original:
# http://blog.marvins.ru/administrirovanie/sam-sebe-dynamic-dns.html
# About yabdex dns service:
# https://yandex.ru/support/pdd/hosting.xml
# auth token:
<Plugin python>
ModulePath "/root/bin"
LogTraces true
Interactive false
Import "sb_pressure"
<Module sb_pressure>
TempOffset -12.0
PressOffset -2000.0
</Module>
#!/bin/bash
ROSDISTRO=indigo
ROSINSTALL=/opt/ros/$ROSDISTRO
ROSUPFILE=/tmp/rosup.yaml
export-armhf-arch() {
export DISTCC_HOSTS='robert'
export ARCH=arm