Skip to content

Instantly share code, notes, and snippets.

View pedrolemoz's full-sized avatar
🎯
Never Settle

Pedro Lemos pedrolemoz

🎯
Never Settle
View GitHub Profile
@pedrolemoz
pedrolemoz / respondeai_paywall_remover.js
Last active March 6, 2023 05:55
Responde Aí Paywall Remover
let book = document.getElementById("livro").cloneNode(true);
let classNames = [
"sc-sspg3m-0 eHxMNi",
"sc-1gelwlk-0 hxgNbb",
"sc-sspg3m-5 jrpxZf",
"sc-sspg3m-6 boCaKs",
"sc-sspg3m-8 iRLKDk",
"sc-sspg3m-9 cHLEwn",
"sc-1iousas-0 jKQDwC",
@pedrolemoz
pedrolemoz / chain_of_responsability.dart
Last active October 18, 2021 13:34
Chain of resposability
abstract class Validator {
final Validator? nextValidator;
Validator([this.nextValidator]);
bool call(int value);
}
class Class1 implements Validator {
@override
@pedrolemoz
pedrolemoz / split_list_int_lists_of_values_with_type_t.dart
Created July 2, 2021 15:45
Split list into lists of values with type Generic
void main() {
final data = List.generate(10, (index) => index);
final result = splitListIntoListsOfValuesWithType<int>(splitQuantity: 4, elements: data);
print(result);
}
List<List<T>> splitListIntoListsOfValuesWithType<T>({List<T> elements, int splitQuantity}) {
List<List<T>> resultList = [];
for (var index = 0; index < elements.length; index += splitQuantity) {
@pedrolemoz
pedrolemoz / gauss_seidel.dart
Last active December 24, 2020 18:22
Gauss-Seidel Method
void main() {
final i = IterativeMethods();
i.gaussSeidel(
precision: 4,
initialAproximation: [0, 0, 0],
maxIterations: 10,
matrix: [
[5, 2, 1, 0],
[2, 4, 1, 2],
@pedrolemoz
pedrolemoz / FlutterCommands.md
Last active October 14, 2020 15:12
Useful commands for Flutter development

Create a new Flutter project from command line

flutter create --org "com.pedrolemoz" -a kotlin --androidx -i swift --description "Description" project_name_with_underscores

Switch between channels

flutter channel stable (or beta, dev, master)
flutter upgrade
@pedrolemoz
pedrolemoz / auto_formatter.dart
Created October 10, 2020 15:36
Auto formatter for Dart Files within a Flutter project
import 'dart:io';
/*
Author: Pedro Lemos
Email: lemozxpedro@gmail.com
Created in: 10/10/2020 @ 12:36 PM
*/
class AutoFormatter {
static void formatAllDartFiles({
@pedrolemoz
pedrolemoz / magic_magnet.dart
Last active July 5, 2020 15:17
Magic Magnet in Dart
import 'package:http/http.dart' as http;
import 'package:html/parser.dart';
class MagicMagnet {
Map _magnetLinks = {};
Future<Map> search(String searchContent,
{bool google = true,
bool tpb = false,
bool l337x = false,