Skip to content

Instantly share code, notes, and snippets.

View lvyitian's full-sized avatar

Lv Yitian lvyitian

  • 20:01 (UTC +08:00)
View GitHub Profile
<Version>1.0.0.0</Version>
<BASIC>http://drive.google.com/uc?export=download&id=1WgqkqKV9Gz_C4a2b8FL1nmzo1c2GqY1K</BASIC>
<STANDARD>http://drive.google.com/uc?export=download&id=1qEv2dOgRbcS_8UG59wNCuZ5TF_lCJS6k</STANDARD>
<PLUS>http://drive.google.com/uc?export=download&id=1V-2H-PBEQCo6oySslpu8jxPt4MmCs-cU</PLUS>
<KAV>http://drive.google.com/uc?export=download&id=1S9HomQ9RNGb13fdpD748hsUnfDtqLMm_</KAV>
<KIS>http://drive.google.com/uc?export=download&id=1sWMncG8KkZI6msKkzqLC12SAefWiQJBR</KIS>
<KTS>http://drive.google.com/uc?export=download&id=1ZE3WqqJDAuPFbKbmpqgMJ8Z1qfGZmEVb</KTS>
<KSOS>http://drive.google.com/uc?export=download&id=1bz96C1Np7FMGiwHixI8N4XiTKbgbV8Ii</KSOS>
<KES>http://drive.google.com/uc?export=download&id=1MvF-Uo_7IE2GtiJRkrXOFUtdkTQsQuGt</KES>
<Trial>http://drive.google.com/uc?export=download&id=1y-7qzLZxBvCXZ3zFUJycgCY63CtFFu1I</Trial>
@lvyitian
lvyitian / HelloJSR.class
Created July 27, 2024 08:24 — forked from Maccimo/HelloJSR.class
JSR/RET JVM instructions usage sample
@lvyitian
lvyitian / lldb_cheat_sheet.md
Created July 23, 2024 14:39 — forked from ryanchang/lldb_cheat_sheet.md
LLDB Cheat Sheet

LLDB Cheat Sheet

A complete gdb to lldb command map.

Print out

  • Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
  • p - Print primitive type
@lvyitian
lvyitian / ldrloaddll_hook.c
Created July 16, 2024 14:44 — forked from bats3c/ldrloaddll_hook.c
Hook LdrLoadDll to whitelist DLLs being loaded into a process
#include <stdio.h>
#include <windows.h>
#include <winternl.h>
#define dwAllowDllCount 1
CHAR cAllowDlls[dwAllowDllCount][MAX_PATH] = {
"W:\\allowed.dll"
};
VOID HookLoadDll(LPVOID lpAddr);
@lvyitian
lvyitian / c++
Created July 15, 2024 16:52 — forked from nidefawl/c++
JNI agent example
JNIEXPORT jint JNICALL Agent_OnLoad(JavaVM *jvm, char *options, void *reserved)
{
jvmtiError error;
jint res;
jvmtiEnv *jvmti = NULL;
/* Setup initial global agent data area
* Use of static/extern data should be handled carefully here.
* We need to make sure that we are able to cleanup after ourselves
* so anything allocated in this library needs to be freed in
@lvyitian
lvyitian / Extensions.kt
Created July 2, 2024 23:51 — forked from LloydBlv/Extensions.kt
Install APK programmatically
return Intent().apply {
if (isN()) {
action = Intent.ACTION_INSTALL_PACKAGE
flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
data = FileProvider.getUriForFile(context,
"${context.applicationContext.packageName}.provider", apkFile)
} else {
action = Intent.ACTION_VIEW
data = Uri.fromFile(apkFile)
type = "application/vnd.android.package-archive"

Hello. I've decided to share a lot more of my knowledge in public forums from now on, and to not divert any of my focus away from improving the world in a way that stays written in history.

This Gist is about discussing on how to improve AV1 decoding performance on 2 fronts: improving performance through more efficient decoding, and through decoding aware encoding.

Improving decoding performance through more efficient decoding.

Here are many tips on how to improve decoding performance on any machine:

1. Keep your favorite media player up to date!

@lvyitian
lvyitian / UpdateChecker.java
Created June 16, 2024 09:03 — forked from 2008Choco/UpdateChecker.java
An update checker wrapper for Spigot plugins
import com.google.common.base.Preconditions;
import com.google.gson.JsonElement;
import com.google.gson.JsonParser;
import com.google.gson.stream.JsonReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.concurrent.CompletableFuture;
@lvyitian
lvyitian / mutex-concept.ts
Created May 8, 2024 16:07 — forked from Hadaward/mutex-concept.ts
A mutex concept implemented in javascript, to ensure you don't have unexpected value changes.
export type MutexGuard<T> = Readonly<{
id: string,
get: () => T,
set: (value: T) => void,
unlock: () => void
}>;
export type Mutex<T> = Readonly<{
lock(): Promise<MutexGuard<T>>
}>;
@lvyitian
lvyitian / versions.txt
Created April 17, 2024 12:53 — forked from benigumocom/versions.txt
Android Version Market Share Worldwide
2024-03-01
+-----+------+--------------+-------+-------+----------+----------+
| API | OS | CODE_NAME | WW % | JP % | WW SUM % | JP SUM % |
+=====+======+==============+=======+=======+==========+==========+
| 19 | 4.4 | KITKAT | 0.24 | 0.17 | 99.77 | 99.76 |
+-----+------+--------------+-------+-------+----------+----------+
| 21 | 5.0 | LOLLIPOP | 0.30 | 0.21 | 99.53 | 99.59 |
+-----+------+--------------+-------+-------+----------+----------+
| 22 | 5.1 | LOLLIPOP_MR1 | 0.84 | 1.39 | 99.23 | 99.38 |
+-----+------+--------------+-------+-------+----------+----------+