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 / 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
@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:
#!/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)
#!/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 / 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 / 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
@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 / pdfsplit.pl
Created November 21, 2012 18:52
pdfsplit is a Perl script that cuts each page in pdf file into half.
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;
use PDF::API2;
sub parseBox {
my ($box) = @_;
if ($box =~ /^\s*([\-\.\d]+)\s+([\-\.\d]+)\s+([\-\.\d]+)\s+([\-\.\d]+)\s*$/) {
'''
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