Skip to content

Instantly share code, notes, and snippets.

View vlw's full-sized avatar
🔧
LineageOS Android Developer

Vladimir Bely vlw

🔧
LineageOS Android Developer
View GitHub Profile
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();

Minecraft on Apple Silicon

In this gist, you can find the steps to run Minecraft 1.16.4 natively on Apple Silicon (AS), without needing Rosetta 2 translation of the dependencies (mainly LWJGL and related libraries).

While it's possible to use a launcher like MultiMC to have a prettier way to run the game on AS, it requires installing even more dependencies (like QT) which take time and are difficult to distribute. Therefore, I've put together a command line-based launcher tool using a couple shell & Python scripts.

To get up and running quickly, follow the steps below. Otherwise, for more detail, watch my YouTube video.

Download my package

@vlw
vlw / gist:a887076d4c2ba74c55acff7f0c1c44fe
Created April 16, 2021 22:52
asyncTGv2-wifi without internet
Decoding stack results
0x40207427: WiFiClient::write(unsigned char const*, unsigned int) at /home/vlw/Arduino/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/include/DataSource.h line 21
0x401002ea: millis() at /home/vlw/Arduino/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_wiring.cpp line 193
0x4020d540: optimistic_yield(uint32_t) at /home/vlw/Arduino/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_features.h line 93
0x402085ac: BearSSL::WiFiClientSecure::_run_until(unsigned int, bool) at /home/vlw/Arduino/hardware/esp8266com/esp8266/cores/esp8266/PolledTimeout.h line 234
0x40229c2c: br_ssl_hs_client_init_main at src/ssl/ssl_hs_client.c line 904
0x40229c7c: br_ssl_hs_client_run at src/ssl/ssl_hs_client.c line 957
0x402296f6: br_ssl_engine_hs_reset at src/ssl/ssl_engine.c line 1319
0x40208853: BearSSL::WiFiClientSecure::_wait_for_handshake() at /home/vlw/Arduino/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 564
0x40208a3b: BearSSL::WiFiClientSecur
@vlw
vlw / gist:29a660f41fe6ed00729dd839b7625d93
Created April 16, 2021 22:46
asyncTGv2 OTA update ESP8266
Decoding stack results
0x4020d544: optimistic_yield(uint32_t) at /home/vlw/Arduino/hardware/esp8266com/esp8266/cores/esp8266/core_esp8266_features.h line 93
0x40206cca: WiFiClient::available() at /home/vlw/Arduino/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClient.cpp line 252
0x40208657: BearSSL::WiFiClientSecure::_run_until(unsigned int, bool) at /home/vlw/Arduino/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 527
0x40229c30: br_ssl_hs_client_init_main at src/ssl/ssl_hs_client.c line 904
0x40229c80: br_ssl_hs_client_run at src/ssl/ssl_hs_client.c line 957
0x402296fa: br_ssl_engine_hs_reset at src/ssl/ssl_engine.c line 1319
0x40208857: BearSSL::WiFiClientSecure::_wait_for_handshake() at /home/vlw/Arduino/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp line 564
0x40208a3f: BearSSL::WiFiClientSecure::_connectSSL(char const*) at /home/vlw/Arduino/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.
@vlw
vlw / lol.k
Created January 8, 2018 14:41
Lol.k
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
string **dp;
int main() {
string s1,s2;
long long i,j;
cin>>s1;
@vlw
vlw / logcat.d
Created November 6, 2017 22:39
crash mifit 3.1.0 nov-7-2017-01:35
11-07 01:34:30.281 31973 31992 I MicroRecognitionRunner: Detection finished
11-07 01:34:30.412 2589 2589 W System.err: java.lang.ClassNotFoundException: android.view.MiuiWindowManager$LayoutParams
11-07 01:34:30.412 2589 2589 W System.err: at java.lang.Class.classForName(Native Method)
11-07 01:34:30.412 2589 2589 W System.err: at java.lang.Class.forName(Class.java:400)
11-07 01:34:30.412 2589 2589 W System.err: at java.lang.Class.forName(Class.java:326)
11-07 01:34:30.412 2589 2589 W System.err: at com.xiaomi.hm.health.baseui.d.b.b(SystemBarTintManager.java)
11-07 01:34:30.412 2589 2589 W System.err: at com.xiaomi.hm.health.baseui.d.b.a(SystemBarTintManager.java)
11-07 01:34:30.412 2589 2589 W System.err: at com.xiaomi.hm.health.baseui.c.b.a(BaseTitleActivity.java)
11-07 01:34:30.413 2589 2589 W System.err: at com.xiaomi.hm.health.baseui.c.b.a(BaseTitleActivity.java)
11-07 01:34:30.413 2589 2589 W System.err: at com.xiaomi.hm.health.baseui.c.b.a(BaseTitleActivity.java)
This file has been truncated, but you can view the full file.
15:17:06.499262 execve("/system/bin/app_process", ["/system/bin/app_process", "-Xzygote", "/system/bin", "--zygote", "--start-system-server", "--start-system-server"], [/* 16 vars */]) = 0
15:17:06.501881 mprotect(0xb6f6a000, 4096, PROT_READ) = 0
15:17:06.504843 set_tid_address(0xb6f6cb4c) = 611
15:17:06.505076 set_tls(0xb6f6cb8c, 0, 0x28, 0xb6f6d214, 0xb6f6cb44) = 0
15:17:06.505250 mmap2(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f49000
15:17:06.505447 madvise(0xb6f49000, 12288, MADV_MERGEABLE) = 0
15:17:06.505584 mprotect(0xb6f49000, 4096, PROT_NONE) = 0
15:17:06.505726 sigaltstack({ss_sp=0xb6f4a000, ss_flags=0, ss_size=8192}, NULL) = 0
15:17:06.505919 prctl(0x53564d41 /* PR_??? */, 0, 0xb6f4a000, 0x2000, 0xb6f68a14) = 0
15:17:06.506102 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f48000
@vlw
vlw / dmesg
Created December 21, 2016 13:03
dmesg
Microsoft Windows [Version 10.0.14393]
(c) Корпорация Майкрософт (Microsoft Corporation), 2016. Все права защищены.
C:\Users\vlwww>adb shell dmesg
error: no devices/emulators found
C:\Users\vlwww>adb shell dmesg
error: no devices/emulators found
C:\Users\vlwww>adb shell dmesg
@vlw
vlw / logcat.txt
Created December 20, 2016 11:15
Log fd-5 not finded
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
--------- beginning of main
05-16 09:20:45.083 256 256 W auditd : type=1325 audit(0.0:2): table=filter family=2 entries=0
05-16 09:20:45.083 256 256 W auditd : type=1325 audit(0.0:3): table=mangle family=2 entries=0
05-16 09:20:45.083 256 256 W auditd : type=1325 audit(0.0:4): table=nat family=2 entries=0
05-16 09:20:45.083 256 256 W auditd : type=1325 audit(0.0:5): table=raw family=2 entries=0
05-16 09:20:45.083 256 256 W auditd : type=1325 audit(0.0:6): table=security family=2 entries=0
05-16 09:20:45.083 256 256 W auditd : type=1325 audit(0.0:7): table=filter family=3 entries=0
05-16 09:20:45.093 256 256 W auditd : type=1325 audit(0.0:8): table=filter family=10 entries=0