Skip to content

Instantly share code, notes, and snippets.

View darwin-morocho's full-sized avatar

Darwin Morocho darwin-morocho

View GitHub Profile
@darwin-morocho
darwin-morocho / geolocator_wrapper.dart
Last active September 2, 2022 12:25
Flutter - A class to wrap the static methods of the geolocator plugin, with this you can mock the wrapper for unit testing or widget testing
import 'dart:async';
import 'package:geolocator/geolocator.dart';
class GeolocatorWrapper {
StreamController<Position>? _positionController;
StreamController<bool>? _serviceEnabledController;
StreamSubscription? _positionSubscription, _serviceEnabledSubscription;
/// check if the Location Service is Enabled
Future<bool> get isLocationServiceEnabled => Geolocator.isLocationServiceEnabled();

Crear usuario

adduser username

Agregar permission de administrador

usermod -aG sudo username

@kientux
kientux / AES256Cryptor.java
Last active January 16, 2021 10:50
Encrypt and decrypt AES-256 (in CryptoJS way)
/**
* Created by kientux on 3/20/15
*/
import android.util.Base64;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Arrays;