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 / trice-pio-publish.py
Created September 22, 2023 12:59
Publish TRICE to PlatformIO
#!/usr/bin/env python3
import os
import json
import requests
import tarfile
from zipfile import ZipFile
def download_file(url, filename):
with requests.get(url, stream=True) as r:
@vshymanskyy
vshymanskyy / aura_rgb.py
Created August 9, 2021 13:44
Asus AURA RGB control using Python
#!/usr/bin/env python3
#
# Warning: use at your own risk!
#
from smbus2 import SMBus
import sys, time, socket
AURA_REG_DEVICE_NAME = 0x1000
@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
'''
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
#!/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")
@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
#!/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)

img

img

RGB LED

Red   - GC1 (D9)
Green - GC2 (D10)
Blue  - GC0 (D8)
@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

@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)