Skip to content

Instantly share code, notes, and snippets.

View sergiocasero's full-sized avatar
😄

Sergio Casero Hernández sergiocasero

😄
View GitHub Profile
@sergiocasero
sergiocasero / build.gradle.kts
Last active March 30, 2021 08:13
Add common code to sonarqube analysis
buildscript {
repositories {
// repos
}
dependencies {
// deps
}
}
plugins {
!#/bin/bash
for d in */ ; do
cd $d
if [ -f "pubspec.yaml" ]; then
echo "$d is a flutter project"
flutter clean
else
echo "$d is a gradle project"
./gradlew clean
@sergiocasero
sergiocasero / crontab
Last active September 29, 2022 11:15
A simple, lightweight but powerfull telegram bot that sends your public IP through telegram in case it changes, really useful if you have dynamic IPs but also have a private cloud
# Every minute, perfect for IP_INFO free tier
* * * * * /usr/bin/python3 /PATH_TO_THE_SCRIPT/ipbot.py
test:
stage: test
script:
- ./gradlew test jacocoTestReport
tags:
- docker-L
artifacts:
paths:
- shared/build/reports/jacoco.xml
@sergiocasero
sergiocasero / good_morning.yaml
Last active January 23, 2023 14:34
Good morning Home Asssistant
description: ""
trigger:
- platform: time
at: "08:00:00"
condition: []
action:
- service: notify.telegram
data:
message: >
{# Change these entities with your's #}
@sergiocasero
sergiocasero / Explanation.md
Last active December 13, 2023 10:16
Firebase wrapper for iOS and Android with kotlin multiplatform

Hello guys, I've raised into that problem for a days, but i think I've found one solution, maybe this isn't the better way to do that, but... I will share it. (This is inspired in the Firebase multiplatform repo -> https://github.com/RubyLichtenstein/Kotlin-Multiplatform-Firebase, I'm just summarizing that)

If you want to call some code from a DataSource or Repository from your common code, and the libraries you're using use callbacks, you need to wrap them and there are some problems:

Let me explain it with an example:

expect class RemoteDataSource() {