Skip to content

Instantly share code, notes, and snippets.

View shashankdaima's full-sized avatar

Shashank Daima shashankdaima

View GitHub Profile
@shashankdaima
shashankdaima / response.json
Last active March 12, 2024 13:01
Json response
{
"name": "Shashank Daima",
"profile_photo": "assets/profile_photo.png",
"bio": "Wannable Software Developer, was previously interested in Mobile Development. Now, majorly have interest in Web3. Graduated from IIIT-Delhi in 2023. ",
"company_name": "Chartr",
"position": "ex-Software Developer",
"logo": "images/chartr_logo.png",
"timeline": [
{
"join_date": "Jan-2023",

Motivation to use simple stack :

  1. Instance State Restoration
  2. Navigation b/w fragment or views in so-called navigation components way.
  3. Basic viewmodels should be attached to fragment/view that has lifecycle of activity-retained scope.
  4. Service locator/DI for simple apps that works at Singleton Component and ActivityRetainedComponent.
  5. [Pro-point] You can control your navigator from viewModel, so no more dependence on channelFlow for such basic action.

How To Use that in current App:

  1. Make a new Activity[SimpleStackMainActivity.java].

Keybase proof

I hereby claim:

  • I am shashankdaima on github.
  • I am shashankdaima (https://keybase.io/shashankdaima) on keybase.
  • I have a public key ASB1PVmUJXtbWXcBk2sWvXbrxdbENd2OouCL76awL0FEDQo

To claim this, I am signing this object:

@shashankdaima
shashankdaima / code.kt
Last active November 24, 2021 11:41
Time mapper.
import java.util.*
/*
* This is something that i wrote purely because of requirement in future i will improve on this.
* */
class DateTime {
lateinit var date: Triple<Int, Int, Int> //FORMAT: DATE/MONTH/YEAR
lateinit var time: Triple<Int, Int, Int> //FORMAT: HOURS:MINUTES:SECONDS
var epoch: Long = 0