Skip to content

Instantly share code, notes, and snippets.

View Yubyf's full-sized avatar
😯

Alex Liu Yubyf

😯
View GitHub Profile
@Yubyf
Yubyf / README.md
Created May 30, 2025 20:31 — forked from maboloshi/README.md
[Mac下配置Aria2] #macOS #aria2

Mac下配置Aria2

安装和设置 Aria2

# 使用 Homebrew 安装 aria2
brew install aria2

# 创建配置文件aria2.conf和空对话文件aria2.session
mkdir ~/.aria2 && cd ~/.aria2
touch aria2.conf
@Yubyf
Yubyf / draw.io.custom.json
Last active April 10, 2025 09:27 — forked from cdfmlr/draw.io.custom.json
Customise default colours, fonts, styles for draw.io.
{
"__README": [
"Customise default colours, fonts, styles for draw.io.",
"See https://www.diagrams.net/doc/faq/configure-diagram-editor",
"See https://drawio-app.com/customise-default-colours-fonts-styles-and-the-draw-io-ui-in-confluence-cloud/"
],
"customColorSchemes": [
[
{
"fill": "#FFEBEE",
@Yubyf
Yubyf / MyLifecycleOwner.kt
Created February 3, 2024 03:40 — forked from handstandsam/MyLifecycleOwner.kt
Jetpack Compose OverlayService. You have to have all the correct permissions granted and in your manifest, but if you do, this this will show a green box with "Hello" in it!
import android.os.Bundle
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleRegistry
import androidx.savedstate.SavedStateRegistry
import androidx.savedstate.SavedStateRegistryController
import androidx.savedstate.SavedStateRegistryOwner
internal class MyLifecycleOwner : SavedStateRegistryOwner {
private var mLifecycleRegistry: LifecycleRegistry = LifecycleRegistry(this)
private var mSavedStateRegistryController: SavedStateRegistryController = SavedStateRegistryController.create(this)
@Yubyf
Yubyf / ffmpeg-mp4-to-animated-webp.md
Created October 15, 2022 12:29 — forked from witmin/ffmpeg-mp4-to-animated-webp.md
Convert MP4 file to animated WebP in ffmpeg

Convert MP4 file to animated WEBP file in ffmpeg CLI

1. Install ffmpeg CLI through homebrew

In terminal.app, install ffmpeg through homebrew

brew install ffmpeg

Validate the installation:

@Yubyf
Yubyf / HeadlessFragment.java
Created April 8, 2021 01:23 — forked from keyboardr/HeadlessFragment.java
A file template for creating a headless Fragment. The attach() methods add the fragment to the parent if it doesn't already exist and returns the attached fragment. The methods ensure that the parent implements the parent interface. If needed, parameters may be added to the attach() methods to supply fragment arguments.
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
#parse("File Header.java")
public class ${NAME} extends Fragment {
private static final String FRAG_TAG = ${NAME}.class.getCanonicalName();
@Yubyf
Yubyf / android_toolchain.cmake
Created January 10, 2020 00:47 — forked from nddrylliog/android_toolchain.cmake
CMake toolchain for Android
# ------------------------------------------------------------------------------
# Android CMake toolchain file, for use with the Android NDK r5-r8
# Requires cmake 2.6.3 or newer (2.8.5 or newer is recommended).
# See home page: http://code.google.com/p/android-cmake/
#
# The file is mantained by the OpenCV project. And also can be found at
# http://code.opencv.org/projects/opencv/repository/revisions/master/changes/android/android.toolchain.cmake
#
# Usage Linux:
# $ export ANDROID_NDK=/absolute/path/to/the/android-ndk
@Yubyf
Yubyf / 100-override-cn.conf
Created May 8, 2017 01:08
Kindle LinkFonts Config Backup
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!-- 替换宋体 -->
<match target="pattern">
<test name="family" compare="eq">
<string>extrafont1</string>
</test>
<edit name="family" mode="prepend" binding="strong">
@Yubyf
Yubyf / font.properties
Created May 8, 2017 01:02
Kindle Font Properties Backup
fonts.ja=tsukushimincho
font.tsukushimincho.display=\u7B51\u7D2B\u660E\u671D
fonts.zh-Hans=stkai,styuan,extrafont1,extrafont2,extrafont3,extrafont4
font.stkai.display=\u6977\u4F53
font.styuan.display=\u5706\u4F53
font.extrafont1.display=\u601D\u6E90\u5B8B\u4F53
font.extrafont2.display=\u601D\u6E90\u9ED1\u4F53
font.extrafont3.display=\u65B9\u6B63\u65B0\u4E66\u5B8B
font.extrafont4.display=\u5B8B\u523B\u672C\u79C0\u6977
languages=ja,zh-Hans