Skip to content

Instantly share code, notes, and snippets.

View ByteSizedMarius's full-sized avatar

Marius ByteSizedMarius

  • Deutschland
View GitHub Profile
@ByteSizedMarius
ByteSizedMarius / MainActivity.kt
Last active October 21, 2024 19:55
Flutter/Dart: Check if User CA / User certificate is installed
import android.content.Intent
import android.os.Build
import android.provider.Settings
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import java.security.KeyStore
import java.security.cert.X509Certificate
@ByteSizedMarius
ByteSizedMarius / main.dart
Created November 9, 2023 14:35
Flutter: Sending AdGuard intents (Tasker Automation Interface)
// https://adguard.com/kb/adguard-for-android/solving-problems/tasker/
// https://pub.dev/packages/android_intent_plus
import 'package:android_intent_plus/android_intent.dart';
Future<void> setAdguard(bool active, {bool quiet=false}) async {
AndroidIntent intent = AndroidIntent(
action: active ? "start" : "stop",
componentName: "com.adguard.android.receiver.AutomationReceiver",
package: "com.adguard.android",
@ByteSizedMarius
ByteSizedMarius / ExtractSavedPlacesGMaps.md
Last active November 23, 2024 13:43
Google Maps: Extract places from shared list

Edit: This doesn't work for lists > 20 items, because pagination does not work. Please see here

This script allows extracting name and coordinates for gmaps shared lists. It is incredibly unstable and may break anytime. Good luck figuring out why, because the syntax is extremely confusing and basically makes no sense at all. Thanks to google for not providing an api for this after LITERALLY 12 YEARS

How to use this script:

  1. Share a list and open the link in a browser window. It will redirect. The new link will look like this: google.com/maps/@<your coords>/data=....
  2. Take the data-portion and paste it into the following link: https://google.com/maps/@/data=?ucbcb=1