Skip to content

Instantly share code, notes, and snippets.

View ysy950803's full-sized avatar
😄
blog.ysy950803.top

Sylvester Yao ysy950803

😄
blog.ysy950803.top
View GitHub Profile
import android.database.sqlite.SQLiteTransactionListener
import androidx.sqlite.db.SupportSQLiteDatabase
import androidx.sqlite.db.SupportSQLiteOpenHelper
import com.commonsware.cwac.saferoom.SafeHelperFactory
import java.util.concurrent.locks.ReentrantLock
class SupportSQLiteOpenHelperWrapped(val source: SupportSQLiteOpenHelper) : SupportSQLiteOpenHelper by source {
private val writableDatabaseLazy: SupportSQLiteDatabaseWrapped by lazy {
SupportSQLiteDatabaseWrapped(source.writableDatabase)
@ErikHellman
ErikHellman / WebViewServer.kt
Last active September 12, 2023 16:10
This class is no longer needed now that Google provides WebViewAssetLoader (see https://developer.android.com/reference/kotlin/androidx/webkit/WebViewAssetLoader)
/*
MIT License
Copyright (c) 2019 Erik Hellman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@huazhanshen
huazhanshen / BT 磁力搜索引擎索引
Created May 30, 2018 05:39
BT 磁力搜索引擎索引
btkitty
知名的BT磁力搜索,资源很多
http://cnbtkitty.com/
备用域名:http://btkitty.fyi/
idope.se
资源丰富的BT磁力搜索,并且大多数速度下载速度很快
https://idope.se/
@walkermanx
walkermanx / 20171230_01.md
Created December 30, 2017 14:45
颜色渐变<gradient>标签之坑爹的 @android:color/transparent

先来切入一个场景:

[小五][]童鞋想要一个直线的渐变,从左到右,颜色从绿色逐渐变成透明的,按照这个想法,[小五][]童鞋写下了如下代码:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
 android:shape="rectangle"&gt;
@kookxiang
kookxiang / hackQQ.sh
Last active October 8, 2024 11:48
一键得到一个精简版的手机QQ(Android)
#!/system/bin/sh
# 使用方法:
# adb shell "curl -Ssl https://gist.githubusercontent.com/kookxiang/1104e898f270c9a7a0784f70979ec532/raw/hackQQ.sh | su"
# 使用方法 (手动):
# 0.确保你手机 Root 了
# 1.下载这个脚本到某个地方
# 2.下载 Android SDK(需要其中的 adb)
# 3.在命令行运行 adb devices,确保能看到你的手机