# noble for ubuntu 24.04 or jammy for 22.04
sudo add-apt-repository -y -s deb http://security.ubuntu.com/ubuntu noble main universe
sudo apt update
This file contains 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
let source = URL(fileURLWithPath: "input.mov") | |
let destination = URL(fileURLWithPath: "output.mov") | |
try? FileManager.default.removeItem(at: destination) | |
let asset = AVAsset(url: source) | |
let reader = try! AVAssetReader(asset: asset) | |
let writer = try! AVAssetWriter(outputURL: destination, fileType: .mov) | |
let videoTrack = await asset.getFirstTrack(withMediaType: .video) |
This file contains 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:collection/collection.dart' show ListEquality; | |
import 'package:jose/jose.dart'; // BSD-3-Clause, use `dart_jsonwebtoken` package in case of MIT license | |
import 'package:dio/dio.dart'; // default `http` package can be used as well | |
const firebaseProjectId = "FIREBASE_PROJECT_ID"; | |
const firebaseProjectNumber = "FIREBASE_PROJECT_NUMBER"; | |
const firebaseAppIds = [ | |
"FIREBASE_IOS_APP_ID", | |
"FIREBASE_ANDROID_APP_ID", | |
"FIREBASE_WEB_APP_ID" |
This file contains 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:dio/dio.dart'; // default `http` package can be used as well | |
import 'package:jose/jose.dart'; // BSD-3-Clause, use `dart_jsonwebtoken` package in case of MIT license | |
const firebaseProjectId = "FIREBASE_PROJECT_ID"; | |
Map<String, String> googleSecureTokens = {}; // { "KeyId": "PublicKey" } from public Google website | |
DateTime? googleTokensExpirationDate; | |
// Verify Firebase JWT token | |
// https://firebase.google.com/docs/auth/admin/verify-id-tokens#verify_id_tokens_using_a_third-party_jwt_library | |
Future<bool> validateToken(String token) async { |