Skip to content

Instantly share code, notes, and snippets.

View svasquezm's full-sized avatar

Sebastián Vásquez svasquezm

  • Santiago de Chile
View GitHub Profile
@svasquezm
svasquezm / android-room-2.2.1-hierarchy-implememntarion.kt
Created November 6, 2019 17:04
Android Room 2.2.1 hierarchy implementation in Kotlin
package com.frogmi.feature.information.domain.models
import android.content.Context
import androidx.room.*
/**
* Entities
*/
@Entity(tableName = "infos")
@svasquezm
svasquezm / frogmi_architecture_guideline.md
Last active November 21, 2019 18:14
Frogmi Architecture guideline

Project structure guideline

This document describes how modules must be structured.

Clean architecture

Each module use Clean architecture aproach and contains at least 3 sub-packages. domain, data and presentation.

Domain

Execute business logic which is independent of any layer

  1. models: Contains models annotated with Room annotations. These classes contains toPresentationModel() which converts models to be usen in presentation layer.
  • Name convention: Model.kt

RTKLIB CUI Tools

This document describes how to install and use main CUI Tools under a Ubuntu based system.

Installation

Clone the main repository

git clone https://github.com/tomojitakasu/RTKLIB.git

Once clonned, go under app/ directory and execute .

@svasquezm
svasquezm / flow_and_service_events_approach.kt
Last active August 7, 2020 16:09
Flow data with Events Approach
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.launch
import kotlin.random.Random

Proposed changes (mandatory)

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Jira ticket (if appropriate)

Checklist (mandatory)

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

@svasquezm
svasquezm / CHANGELOG.md
Created May 11, 2021 22:41
CHANGELOG proposal 1

CHANGELOG

3.13.0 (YYYY-MM-DD)

Breaking changes

  • Breaking change 1

Features

  • Added Feature Awesome 1
  • Added Feature Awesome 2
@svasquezm
svasquezm / putme_on_array.sh
Created March 12, 2024 11:50
Bash script to format JSON copied text into a JSONArray file
### Validate a clipboard copied JSONArray. If the JSON is not an Array, this
### script put within to one.
### Usage
### 1. Copy a JSON string
### 2. Run this script ./putme_on_array.sh
### 3. If success, can happen
### 3.1 If JSON is a JSONObject, then the script will write a ~/json_array.json file with
### the result in your clipboard
### 3.2 Otherwise the script will print an error