Skip to content

Instantly share code, notes, and snippets.

View rahul-gill's full-sized avatar

Rahul Gill rahul-gill

View GitHub Profile
@rahul-gill
rahul-gill / config.toml
Created January 23, 2024 09:49
StartShip Config
right_format = '$time'
[aws]
format = "\\[[$symbol($profile)(\\($region\\))(\\[$duration\\])]($style)\\]"
symbol = "aws "
[azure]
symbol = "az "
[bun]
@rahul-gill
rahul-gill / SpecialTabsExperiment.kt
Created December 10, 2023 16:42
SpecialTabsExperiment
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.foundation.gestures.animateScrollBy
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyListState
@rahul-gill
rahul-gill / gen_pl.bat
Created December 10, 2023 16:33
Create playlist from nested directories of music
@echo off
if "%~2"=="" (
echo Usage: %0 ^<directory^> ^<playlist_name^>
exit /B 1
)
set "directory=%1"
set "playlist_name=%2"
if not exist "%directory%" (
@rahul-gill
rahul-gill / DatePickerDialog.kt
Created April 17, 2023 21:10
Date Picker In compose(Someone add horizontal scrolling of months if they have time)
import android.annotation.SuppressLint
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height

Project Goals:

  • Develop a common UI library to ensure a consistent look and feel of UIs for all apps
  • Define a process for migrating apps to use the library
  • Develop design guidelines and standards for the apps(design document)
  • Develop base-level widgets, common UI components
  • Implement screens and workflows to test out on reference sample app
  • Document how to use the UI library and how to update the app when the library is updated.

Styles

  • So we will build styles in the library and provide them to the apps. The lint rules will report whenever style attributes are used in layout files
package com.example
import android.content.Intent
import android.os.Build
import android.provider.Settings
import android.provider.Settings.EXTRA_BIOMETRIC_AUTHENTICATORS_ALLOWED
import androidx.activity.result.ActivityResultLauncher
import androidx.biometric.BiometricManager
import androidx.biometric.BiometricPrompt
import androidx.core.content.ContextCompat
@rahul-gill
rahul-gill / report.md
Last active March 7, 2023 05:15
GSoC '22 Report | The Mifos Initiative | Mifos Android UI library

Google Summer of Code 2022

Project - Mifos UI library for Android Apps

This project focused on implementing a UI library that will be consumed by Mifos Android apps(android-client, mifos-mobile, mobile-wallet) and implement new designs using it across the customer-facing apps providing a consistent and familiar look and feel.

Work Done

  • added common styles, size and padding values to the UI library
  • added lint rule in the library to enforce usage of these defined style only
@rahul-gill
rahul-gill / attrs.md
Last active September 9, 2022 09:24
UI library attributes

Typography

  • Mifos.DesignSystem.TextStyle.Heading
  • Mifos.DesignSystem.TextStyle.SubHeading
  • Mifos.DesignSystem.TextStyle.MainFocusText
  • Mifos.DesignSystem.TextStyle.BodyLarger
  • Mifos.DesignSystem.TextStyle.Body
  • Mifos.DesignSystem.TextStyle.Label
  • Mifos.DesignSystem.TextStyle.Link
  • Mifos.DesignSystem.TextStyle.PrimaryColorBody
  • Mifos.DesignSystem.TextStyle.PrimaryColorBodyLarger
#!/usr/bin/env bash
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
echo 'source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc
git clone https://github.com/zsh-users/zsh-completions.git ~/.zsh/zsh-completions
fpath=(~/.zsh/zsh-completions/src $fpath)
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
echo "source ~/.zsh/zsh-syntax-highlighting" >> ~/.zshrc
@Composable
private fun LoadingDot(
color: Color,
modifier: Modifier = Modifier,
){
Box(
modifier = modifier
.clip(shape = CircleShape)
.background(color = color)
)