Skip to content

Instantly share code, notes, and snippets.

View hjue's full-sized avatar

hjue hjue

  • Beijing, China
View GitHub Profile
function scroll_to(splash, x, y)
local js = string.format(
"window.scrollTo(%s, %s);",
tonumber(x),
tonumber(y)
)
return splash:runjs(js)
end
BIG iOS URL SCHEME LIST
HAD TO MAKE A DROPBOX FILE BECAUSE THIS LIST WAS TOO LONG TO POST IN THE COMMENTS OR NOT MAKE THE WORKFLOW APP TAKE FOREVER TO READ IT.
☠JAILBREAK/SYSTEM APPS
--------------------------
activator://
itms-apps://
itms-services://
@hjue
hjue / main.dart
Created January 9, 2022 09:49 — forked from netsmertia/main.dart
flutter image drawing in canvas
import 'package:flutter/material.dart';
import 'dart:ui' as ui;
import 'package:flutter/services.dart' show rootBundle;
import 'dart:async';
import 'dart:typed_data';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@hjue
hjue / README.md
Last active November 3, 2021 06:58
leetcode-local
  • 从stdin传入测试数据
  • 动态加载实现函数
  • 运行函数
  • 检查输出是否正确
import copy
import os
@hjue
hjue / console.save.js
Created February 11, 2021 11:24 — forked from raecoo/console.save.js
Save JSON object to file in Chrome Devtool
// e.g. console.save({hello: 'world'})
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;
}
if(!filename) filename = 'console.json'
if(typeof data === "object"){
data = JSON.stringify(data, undefined, 4)
@hjue
hjue / build_ios.sh
Created September 1, 2020 07:14 — forked from CaiJingLong/build_ios.sh
build ios shell by @AlexVincent525
# remove iOS bitcode
flutter build ios
cd build/ios/iphoneos/Runner.app/Frameworks
cd App.framework
xcrun bitcode_strip -r app -o app
cd ..
cd Flutter.framework
xcrun bitcode_strip -r Flutter -o Flutter
cd ../../../../../../
// Make sure to replace <YOUR_LOCAL_IP> with
// the external IP of your computer if you're using Android.
// Note that we're using port 8888 which is Charles' default.
String proxy = Platform.isAndroid ? '<YOUR_LOCAL_IP>:8888' : 'localhost:8888';
// Create a new HttpClient instance.
HttpClient httpClient = new HttpClient();
// Hook into the findProxy callback to set
// the client's proxy.
// Make sure to replace <YOUR_LOCAL_IP> with
// the external IP of your computer if you're using Android.
// Note that we're using port 8888 which is Charles' default.
String proxy = Platform.isAndroid ? '<YOUR_LOCAL_IP>:8888' : 'localhost:8888';
// Create a new HttpClient instance.
HttpClient httpClient = new HttpClient();
// Hook into the findProxy callback to set
// the client's proxy.
// Make sure to replace <YOUR_LOCAL_IP> with
// the external IP of your computer if you're using Android.
// Note that we're using port 8888 which is Charles' default.
String proxy = Platform.isAndroid ? '<YOUR_LOCAL_IP>:8888' : 'localhost:8888';
// Create a new Dio instance.
Dio dio = Dio();
// Tap into the onHttpClientCreate callback
// to configure the proxy just as we did earlier.
@hjue
hjue / infinite_scroll.dart
Created June 23, 2020 06:50 — forked from putraxor/infinite_scroll.dart
Flutter infinite scrolling
import 'dart:async';
import 'package:flutter/material.dart';
class InfiniteScroll extends StatefulWidget {
@override
_InfiniteScrollState createState() => new _InfiniteScrollState();
}
class _InfiniteScrollState extends State<InfiniteScroll> {