This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MessageCache { | |
public final ArrayList<Message> messages = new ArrayList<>(); | |
int messageLimit; | |
public MessageCache(int limit) { | |
messageLimit = limit; | |
} | |
public void addMessage(@Nonnull Message msg) { | |
for (Message m : messages) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- critical amount of fuel | |
settings_criticalFuelAmount = 1200 | |
-- how many seconds wait before updating stats | |
settings_loopWaitTime = 1 | |
-- animated icon color | |
settings_iconColor = colors.red | |
-- background color |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EN: | |
1. Download the VcXsrv application: | |
https://sourceforge.net/projects/vcxsrv/files/latest/download | |
2. Disable Windows Firewall (I had it blocking WSL somehow) | |
3. Run the VcXsrv application. Do not change any settings. | |
When you are prompted to enter additional parameters for VcXsrv, specify "-ac" there, and click "Next" and then "Done". | |
4. Enter the command `ipconfig.exe` at the Windows command prompt and copy the IPv4 address of the Ethernet adapter. | |
5. Run WSL and run the following command: | |
`export DISPLAY=IP_ADDRESS_FROM_IPCONFIG:0.0` (without ``) | |
For example, `export DISPLAY=192.168.43.109:0.0` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Works in android terminal (for example, Terminal Emulator from Google Play, Termux app or adb shell)), | |
# but requires root rights. You should run this script from root user. | |
# | |
# The lowmemorykiller module is responsible for clearing the | |
# device's RAM by terminating background processes. | |
# | |
# Have you ever noticed that after minimizing an application for 5 minutes, | |
# when you maximize it, it starts up as if you hadn't used it before? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apk add clang gcc musl-dev | |
pip install multidict --user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt update && apt upgrade -y | |
apt install python make wget termux-exec clang libjpeg-turbo freetype -y | |
env INCLUDE="$PREFIX/include" LDFLAGS=" -lm" pip install Pillow |