Skip to content

Instantly share code, notes, and snippets.

View hienlt0610's full-sized avatar

Lê Trung Hiển hienlt0610

View GitHub Profile
@hienlt0610
hienlt0610 / dio_client.dart
Created April 29, 2025 03:58 — forked from DattatreyaReddy/dio_client.dart
DIo Client is a wrapper around Dio to support decoder with Compute (Threads)
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'dio_error_util.dart';
typedef ResponseDecoderCallBack<DecoderType> = DecoderType Function(dynamic);
class DioClient {
final Dio dio;
DioClient(this.dio);
@hienlt0610
hienlt0610 / nested_will_pop_scope.dart
Created June 21, 2023 08:27 — forked from schultek/nested_will_pop_scope.dart
An improved WillPopScope widget to allow for nested navigators. See https://github.com/flutter/flutter/issues/47088
import 'package:flutter/material.dart';
class NestedWillPopScope extends StatefulWidget {
const NestedWillPopScope({
Key? key,
required this.child,
required this.onWillPop,
}) : super(key: key);
final Widget child;
@hienlt0610
hienlt0610 / flutter_all_fastlane.sh
Created May 18, 2022 07:50 — forked from samuelematias/flutter_all_fastlane.sh
Using Fastlane for Flutter to deploy iOS, Mac, Android and Web
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
@hienlt0610
hienlt0610 / cf-ddns.rsc
Created February 22, 2022 04:35 — forked from tophrr/cf-ddns.rsc
Mikrotik RouterOS Cloudflare Dynamic DNS Script
# Cloudflare Dynamic DNS update script
# Required policy: read, write, test, policy
# Add this script to scheduler
# Install DigiCert root CA or disable check-certificate
# Configuration ---------------------------------------------------------------------
:local TOKEN "__APITOKEN__"
:local ZONEID "__ZONEIDENTIFIER__"
:local RECORDID "__RECORDIDENTIFIER__"
:local RECORDNAME "__DNSRECORD__"
@hienlt0610
hienlt0610 / Twitter Guest Search.py
Created February 10, 2022 10:02 — forked from K0lb3/Twitter Guest Search.py
public Twitter search as json
import requests
import re
class Twitter:
def __init__(self):
self.s = requests.Session()
self.get_tokens()
def get_tokens(self):
@hienlt0610
hienlt0610 / flutter-singleton-db.dart
Created July 30, 2021 20:12 — forked from madebycm/flutter-singleton-db.dart
Flutter singleton DatabaseHelper
import 'dart:io';
import 'package:path/path.dart';
import 'package:sqflite/sqflite.dart';
import 'package:path_provider/path_provider.dart';
class DatabaseHelper {
static final _databaseName = "MyDatabase.db";
static final _databaseVersion = 1;
@hienlt0610
hienlt0610 / release-android-debuggable.md
Created June 26, 2021 04:27 — forked from nstarke/release-android-debuggable.md
How to make a Release Android App debuggable

How to make a Release Android App debuggable

Let's say you want to access the application shared preferences in /data/data/com.mypackage.
You could try to run adb shell and then run-as com.mypackage ( or adb shell run-as com.mypackge ls /data/data/com.mypackage/shared_prefs), but on a production release app downloaded from an app store you're most likely to see:

run-as: Package 'com.mypackage' is not debuggable
@hienlt0610
hienlt0610 / ddclient.conf
Created April 12, 2021 19:27 — forked from iamhunter/ddclient.conf
DDClient configuration for CloudFlare DDNS
##
## Cloudflare (cloudflare.com)
##
daemon=1800
use=web, web=ipinfo.io/ip, web-skip='IP Address'
ssl=yes
protocol=cloudflare, \
server=www.cloudflare.com, \
login=*cloudflare-email* \
password=*cloudflare-global-api-key* \
@hienlt0610
hienlt0610 / laravel.js
Created October 1, 2020 10:39 — forked from soufianeEL/laravel.js
You use Laravel 5 and you want to send a DELETE request without creating a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. To use, import script, and create a link with the `data-method="DELETE"` and `data-token="{{csrf_token()}}"` attributes.
/*
Exemples :
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}">
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{csrf_token()}}" data-confirm="Are you sure?">
*/
(function() {
@hienlt0610
hienlt0610 / 01. deep_link_howto.md
Created July 24, 2020 07:39 — forked from og721/01. deep_link_howto.md
Android Deep Link 사용