Skip to content

Instantly share code, notes, and snippets.

View easyworld's full-sized avatar
✏️
Auto commiting

Easy World easyworld

✏️
Auto commiting
  • China
View GitHub Profile
@easyworld
easyworld / java
Created July 31, 2020 10:07
redis client demo with cluster
package selftest;
import com.alibaba.fastjson.JSON;
import org.springframework.data.redis.connection.RedisClusterConfiguration;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisNode;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.Cursor;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ScanOptions;
@easyworld
easyworld / RegexDemo.java
Created August 27, 2020 07:20
十六进制ASCII转字符
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexDemo {
private static String converter(String hexWithZeroX) {
StringBuilder sb = new StringBuilder();
Pattern p = Pattern.compile("0x(\\d{2})");
final Matcher matcher = p.matcher(hexWithZeroX);
while (matcher.find()) {
sb.append((char) Integer.parseUnsignedInt(matcher.group(1), 16));
@easyworld
easyworld / splatoon3_printer_by_serial_easycon.py
Last active February 16, 2024 10:24
基于伊机控协议的splatoon3打印机
# 使用说明
# 安装依赖:pip install pyserial
# 准备一个320x120像素的img.png文件放在本脚本同级目录,彩色黑白都可以
# 进入splatoon3画画页面并将笔刷调整到最小
import serial
from serial.tools.list_ports import comports
import struct
import time
@easyworld
easyworld / RaspberryPiSysBot.md
Created January 10, 2023 13:50 — forked from berichan/RaspberryPiSysBot.md
How to compile SysBot.NET for linux-arm64 and run it on a raspberry pi

Preface

My Pokemon shiny raid seed checker https://cute.berichan.net/ which is essentially a dudu bot clone runs on a Raspberry Pi 4 so I thought I'd write down how I compiled an arm-64 optimized version of SysBot.NET/Pokemon.

This guide assumes you have a working and 64-bit compatible Raspberry Pi with the 64-bit version of Raspbian installed and have at least a basic understanding of how to use Raspbian/Linux. If you can't get this set up, you should ask for help in the official Raspberry Pi forums. Note, the 64-bit OS is only installable on the Pi 3 and Pi 4 (and onwards) devices. 32-bit compilation (not covered) is easier but significantly slower for a variety of things SysBot.NET uses, so I don't recommend it.

Make sure your pi is up-to-date by running sudo apt-get update then sudo apt-get dist-upgrade.

Note, This guide also assumes you have already used (with success) SysBot.NET at least once and are able to copy over your c

@easyworld
easyworld / png2inc.py
Last active April 19, 2024 05:12
A script to convert png to Atmosphere/stratosphere/boot/source/boot_splash_screen_notext.inc
from PIL import Image
import sys
# Check for correct usage
if len(sys.argv) != 3:
print(f"Usage: python {sys.argv[0]} input.png output.inc")
sys.exit(1)
input_file_path = sys.argv[1]
output_file_path = sys.argv[2]