This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id "com.android.application" | |
id "org.jetbrains.kotlin.android" | |
id "dev.flutter.flutter-gradle-plugin" | |
} | |
def localProperties = new Properties() | |
def localPropertiesFile = rootProject.file('local.properties') | |
if (localPropertiesFile.exists()) { | |
localPropertiesFile.withReader('UTF-8') { reader -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:math'; | |
import 'dart:typed_data'; | |
import 'package:amap_flutter_map/amap_flutter_map.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:image_editor/image_editor.dart'; | |
import 'package:image_size_getter/image_size_getter.dart' as isg; | |
import 'package:logmap/const/resource.dart'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"port": 3300, | |
"meta": "https://example.com/api/v1/client/subscribe?token=REDACTED&flag=clash", | |
"ssr-meta": "https://example.com?clash=1", | |
"nodes": [ | |
{ | |
"name": "my-home", | |
"schema": "hysteria2", | |
"host": "REDACTED", | |
"port": 34443, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io'; | |
void main(List<String> args) { | |
final file = File('/Users/cai/Downloads/base.apk/lib/arm64-v8a/libapp.so'); | |
final content = file.readAsBytesSync(); | |
// convert to ascii | |
final text = content.map((e) => String.fromCharCode(e)).join(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:pinyin/pinyin.dart'; | |
/// 拼音比较结果类 | |
/// | |
/// 用于存储拼音匹配的结果信息,包括是否匹配、拼音字符串和匹配位置信息 | |
/// | |
/// 主要功能: | |
/// 1. 存储匹配结果 | |
/// 2. 提供构建富文本的方法,可以高亮显示匹配的字符 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Thanks to: https://gist.github.com/bennyhuo/af7c43cc4831661193605e124f539942 | |
println("The init script init.gradle.kts is running!") | |
val gradleHome = System.getProperty("user.home") + "/.gradle" | |
apply { | |
val gradleVersion = gradle.gradleVersion | |
if (gradleVersion < "6.8") { | |
from(gradleHome + "/old.gradle.kts") | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add dayjs dep first | |
pnpm add dayjs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Thanks to: https://gist.github.com/bennyhuo/af7c43cc4831661193605e124f539942 | |
val localMavenUrl = "http://localhost:8081/repository/maven-public/" | |
val urlMappings = mapOf( | |
"https://dl.google.com/dl/android/maven2" to localMavenUrl, | |
"https://repo.maven.apache.org/maven2" to localMavenUrl, | |
"https://plugins.gradle.org/m2" to localMavenUrl, | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 转换数字为中文大写 | |
// 比如:123456789.12 转换为 壹亿贰仟叁佰肆拾伍万陆仟柒佰捌拾玖元壹角贰分 | |
String convertNumberToChinese(double number) { | |
final numberText = number.toStringAsFixed(2); | |
final numberTextList = numberText.split('.'); | |
final integerText = numberTextList[0]; | |
final decimalText = numberTextList[1]; | |
final integerTextList = integerText.split(''); | |
final decimalTextList = decimalText.split(''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
) | |
func main() { | |
if len(os.Args) <= 1 { |
NewerOlder