Skip to content

Instantly share code, notes, and snippets.

View dodola's full-sized avatar
:octocat:
Focusing

dodola dodola

:octocat:
Focusing
View GitHub Profile
@dodola
dodola / WSA_Houdini_Extracter.bat
Created February 12, 2023 18:15 — forked from natsumerinchan/WSA_Houdini_Extracter.bat
Extract libhoudini from WSA.
@echo off
@rem Set variables
set "TMP_PATH=/data/local/tmp"
set "WSA_PORT=127.0.0.1:58526"
@rem Check whether platform-tools is exist or not
adb devices >nul
if not %errorlevel% == 0 (
cls
echo [ERROR] It seems that adb is not exist!
#!/usr/bin/env python3
import argparse
import struct
# little endian, 32-bit words
# Could check for magic 0x01020304 / 0x04030201 to determine endianness
ENDI = '<'
WORD_PAT = ENDI + 'I'
WORD_SZ = struct.calcsize(WORD_PAT)
@dodola
dodola / Vagrantfile
Created November 13, 2022 07:14
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/jammy64"
config.vm.provider "virtualbox" do |vb|
vb.memory = 8192
vb.cpus = 2
end
end
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/jammy64"
config.vm.provider "virtualbox" do |vb|
vb.memory = 8192
vb.cpus = 4
end
end
@dodola
dodola / arm.dart
Created October 23, 2019 02:18
arm assembler
// By PixelToast
var src =
"mov r0, #69\n"
"bx lr\n"
"ldmedeq ip!, {a3-sp}\n"
"strbhi r13, [v2, lr, asr #3]!\n"
"ldrls a3, [sb], sp, asr #0x14\n";
main() {
@dodola
dodola / cloudSettings
Last active March 1, 2020 09:30
vscode
{"lastUpload":"2020-03-01T09:30:44.375Z","extensionVersion":"v3.4.3"}
@dodola
dodola / gist:02a94bf507a4470e4e8138bffc328592
Created November 1, 2018 00:31 — forked from syoyo/gist:9acc46554723db14d3a5
clang/LLVM for Android ARM64 corss compile script
#!/bin/bash
rm -rf CMake*
export NDK=/home/syoyo/local/android-ndk-r10e
export SYSROOT=$NDK/platforms/android-21/arch-arm64
export CC="$NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc"
export CXX="$NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-g++"
@dodola
dodola / gist:0b78eb36e6d84955dfcb6ccac601fd20
Created October 24, 2018 03:06 — forked from dzhioev/gist:6127982
android cout 重定向
#include <android/log.h>
class androidbuf: public std::streambuf {
public:
enum { bufsize = 128 }; // ... or some other suitable buffer size
androidbuf() { this->setp(buffer, buffer + bufsize - 1); }
private:
int overflow(int c) {
if (c == traits_type::eof()) {
*this->pptr() = traits_type::to_char_type(c);
@dodola
dodola / GLTextureView.java
Created March 2, 2016 11:13 — forked from eleventigers/GLTextureView.java
GLTextureView from GLSurfaceView
import java.io.Writer;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGL11;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.egl.EGLContext;
import javax.microedition.khronos.egl.EGLDisplay;
import javax.microedition.khronos.egl.EGLSurface;
import javax.microedition.khronos.opengles.GL;
@dodola
dodola / ClearComment.java
Created February 26, 2016 02:39
删除所有注释
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;