Skip to content

Instantly share code, notes, and snippets.

View thilong's full-sized avatar
💨
Should be quick.

thilong thilong

💨
Should be quick.
  • tyc
  • china
View GitHub Profile
@thilong
thilong / emu-ex-plus-alpha.wsl.compile
Last active May 12, 2021 11:17
emu-ex-plus-alpha 在 WSL 中编译方法
# https://github.com/Rakashazi/emu-ex-plus-alpha
#1. WSL中安装 ubuntu 20.04, 但make无法使用文件内的相对路径,所以需要手动添加include
# 如: imagine/bundle/all/src/boost/android-armv7.mk :
# ../../ -> include ../../
#2. gradle无法识别相对路径,每个模拟器代码需要做如下变更:
# 如: GBA.emu/res/android/proguard.cfg内:
# ../../../EmuFramewor -> @<imagine.path>/../EmuFramework
@thilong
thilong / aar_to_resource.py
Created March 31, 2020 03:48
把aar文件解包并合并的python脚本
#!/usr/local/bin/python3
# -*- coding: utf-8 -*-
import sys, os, shutil, zipfile
import xml.etree.ElementTree as xmlDoc
from enum import Enum
ignoreFiles = ['R.txt', 'proguard.txt']
def log(LEVEL, msg):
@thilong
thilong / Xcode 变量
Created March 26, 2020 02:26
Xcode 变量
Skip to content
Search…
All gists
Back to GitHub
@thilong
@gdavis gdavis/gist:6670468
Last active 14 hours ago • Report abuse
372
116
@thilong
thilong / UILabel with contentInset
Created March 18, 2020 15:07
支持设置内边距的UILabel
import UIKit
class Label: UILabel {
var contentInset: UIEdgeInsets = .zero {
didSet {
invalidateIntrinsicContentSize()
setNeedsLayout()
}
}
@thilong
thilong / gist:709661a75217f34c51f61c8e1821e0e2
Created March 6, 2020 10:09
Compile SDL2 from source
Compile SDL2 from source
Christer Solskogen edited this page 21 days ago · 31 revisions
Note - If you are running on Raspbian Buster Desktop
The instructions below are no longer needed with the latest version of Raspbian Buster, if you are running under the full Desktop. You can just install the SDL2 packages from the official repository in that case, using the following:
sudo apt install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev
If you want to run the SDL2 version on the Raspberry Pi, you currently need to compile SDL2 from source in order to get support for launching full screen applications from the console. Unfortunately, the version bundled with Buster is not compiled with support for the "kmsdrm" backend, so it only works under X11 (which may be fine for you, but keep in mind that you'll might have some lower performance).
Important note:
@thilong
thilong / gist:53140a5c424dda003d7725f9aa710f0e
Created March 6, 2020 06:08
How to slove config.guess failed.
search for /usr/share/automake*/config.guess
check the latest version of automake
$ which automake
$ automake --version
find the appropriate automake folder in /usr/share/automake.*/config.guess
replace config.guess from your build tree with /usr/share/automake.*/config.guess

How to build SDL2 for odroid go advance

Please run this commands on odroid-go advance machine with stock rom( ubuntu 18.04.3 es ).

install following packages

  • build-essential
  • gcc
  • cmake
  • autogen
  • autoconf
var V2Ray = "SOCKS5 127.0.0.1:1081; SOCKS 127.0.0.1:1081; DIRECT;";
var hostExps = [
"redd*it*",
"s3.amazonaws*"
];
var domains = [
"github.com",
"live.com",
"s3.amazonaws.com",
"vpngate.net",