Skip to content

Instantly share code, notes, and snippets.

View vshymanskyy's full-sized avatar
🇺🇦
#StandWithUkraine

Volodymyr Shymanskyy vshymanskyy

🇺🇦
#StandWithUkraine
View GitHub Profile
@vshymanskyy
vshymanskyy / StreamDebugger.ino
Last active November 29, 2016 20:08
This class wraps and Arduino Stream, and dumps all data to another Stream for debug purposes.
/* This class wraps and Arduino Stream,
* and dumps all data to another Stream for debug purposes.
*
* Usage:
* StreamDebugger StreamDbg(Serial1, Serial);
*/
#ifndef StreamDebugger_h
#define StreamDebugger_h
@vshymanskyy
vshymanskyy / TypedBase64.js
Created September 25, 2017 12:33
TypedArray to base64 and back
input = new Float64Array([1,2,3,4])
encoded = Buffer.from(input.buffer).toString('base64')
buff = Buffer.from(encoded, 'base64');
decoded = new Float64Array(Uint8Array.from(buff).buffer)
@vshymanskyy
vshymanskyy / osx_setup.md
Last active March 19, 2019 09:26
Mac OS X

VirtualBox setup

VBoxManage modifyvm "OSX" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "OSX" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "OSX" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "OSX" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "OSX" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "OSX" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1

    1280×720   (HD)
@vshymanskyy
vshymanskyy / linux_setup.md
Last active May 14, 2021 13:50
Ubuntu Kubuntu Linux Setup

Ubuntu setup

  • Install keyboard layout, Alt+Shift
  • KWin shortcuts - remove Ctrl+F3, Ctrl+F4
  • Remove popping on Vol. Up, Vol. Down
  • Dolphin - use common view properties for all folders

/etc/pulse/default.pa: Comment-out load-module module-suspend-on-idle, run systemctl restart --user pulseaudio

img

img

RGB LED

Red   - GC1 (D9)
Green - GC2 (D10)
Blue  - GC0 (D8)
#!/bin/bash
###
# Requires Null Keyboard https://play.google.com/store/apps/details?id=com.wparam.nullkeyboard
# Author: Volodymyr Shymanskyy
###
brightness=$(adb shell settings get system screen_brightness)
ime=$(adb shell settings get secure default_input_method)
@vshymanskyy
vshymanskyy / M5Stack_Espruino.js
Last active February 6, 2024 19:53
M5Stack Espruino initialization example
/*
Also, need to change in ILI9341pal.js:
var LCD_WIDTH = 320;
var LCD_HEIGHT = 240;
*/
BTN1 = D39
BTN2 = D38
BTN3 = D37
SPKR = D25
#!/usr/bin/env lua
local socket = require("socket")
local use_ssl, ssl = pcall(require, "ssl")
local Blynk = require("blynk.socket")
local Timer = require("timer")
local http = require("socket.http")
assert(#arg >= 1, "Please specify Auth Token")
'''
Using your phone:
- Disable PIN code on the SIM card
- Check your balance
- Check that APN, User, Pass are correct and you have internet
Ensure the SIM card is correctly inserted into the board
Ensure that GSM antenna is firmly attached
NOTE: While GSM is connected to the Internet, WiFi can be used only in AP mode
@vshymanskyy
vshymanskyy / Arduino_WiFi_Test.ino
Created July 29, 2021 12:00
Arduino WiFi Test
#if defined(ARDUINO_WIO_TERMINAL)
# include <rpcWiFi.h>
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
# include <WiFiNINA.h>
#elif defined(ARDUINO_SAMD_MKR1000)
# include <WiFi101.h>
#elif defined(ARDUINO_ARCH_ESP8266)
# include <ESP8266WiFi.h>
#else