Skip to content

Instantly share code, notes, and snippets.

View AMarturelo's full-sized avatar
🏠
Working from home

Alberto Marturelo Lorenzo AMarturelo

🏠
Working from home
View GitHub Profile
TextEditingController _passwordController = TextEditingController();
@override
void dispose() {
_passwordController.clear();
_passwordController.dispose();
super.dispose();
}
import 'package:flutter/cupertino.dart';
class SecureTextEditingController extends TextEditingController {
String _previousText = '';
final String printableChars =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
final Map<int, int> obfuscationMap = {};
final Map<int, int> deobfuscationMap = {};
@AMarturelo
AMarturelo / app-build.gradle.kts
Created June 4, 2021 17:09 — forked from DRSchlaubi/app-build.gradle.kts
Flutter Kotlin Gradle DSL
import java.util.Properties
import java.nio.file.Files
val localProperties = Properties()
val localPropertiesFile = rootProject.file("local.properties").toPath()
if (Files.exists(localPropertiesFile)) {
Files.newBufferedReader(localPropertiesFile).use { reader ->
localProperties.load(reader)
}
}
@AMarturelo
AMarturelo / HeaderItemDecoration.kt
Created February 16, 2021 22:37 — forked from filipkowicz/HeaderItemDecoration.kt
Item Decorator for sticky headers in Kotlin
package com.filipkowicz.headeritemdecorator
/*
solution based on - based on Sevastyan answer on StackOverflow
changes:
- take to account views offsets
- transformed to Kotlin
- now works on viewHolders
@AMarturelo
AMarturelo / stickers-downloader.js
Created July 3, 2018 01:53 — forked from lubien/stickers-downloader.js
Download all visible telegram stickers images
// How to download telegram sticker images
/*
1. Go to Telegram Web;
2. Open console (F12);
3. Paste the code below in the console and press Enter;
4. Open your stickers menu and make sure you see the sticker pack you want to download (so Telegram will load it).
5. At the console paste and run "downloadStickers()" any time you want to download a pack.
6. [Convert .webm to another format](http://www.freewaregenius.com/convert-webp-image-format-jpg-png-format/);
7. Happy hacking.
@AMarturelo
AMarturelo / stickers-downloader.js
Created July 3, 2018 01:53 — forked from lubien/stickers-downloader.js
Download all visible telegram stickers images
// How to download telegram sticker images
/*
1. Go to Telegram Web;
2. Open console (F12);
3. Paste the code below in the console and press Enter;
4. Open your stickers menu and make sure you see the sticker pack you want to download (so Telegram will load it).
5. At the console paste and run "downloadStickers()" any time you want to download a pack.
6. [Convert .webm to another format](http://www.freewaregenius.com/convert-webp-image-format-jpg-png-format/);
7. Happy hacking.