Skip to content

Instantly share code, notes, and snippets.

View hlayan's full-sized avatar
🌱
Steadily

Hlayan Htet Aung hlayan

🌱
Steadily
View GitHub Profile
@luismts
luismts / GitCommitBestPractices.md
Last active November 18, 2024 15:18
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@ardakazanci
ardakazanci / FlipCart.kt
Created January 5, 2024 18:11
FlipCard for Jetpack Compose
@Composable
fun FlipCard() {
var rotationXDegrees by remember { mutableStateOf(0f) }
var rotationYDegrees by remember { mutableStateOf(0f) }
val rotationX by animateFloatAsState(
targetValue = rotationXDegrees,
animationSpec = tween(durationMillis = 1000)
)
val rotationY by animateFloatAsState(
targetValue = rotationYDegrees,
@ardakazanci
ardakazanci / CircularMainMenuGroup.kt
Created January 13, 2024 05:54
Circular Menu Group for jetpack compose
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
setContent {
CircularMenuGroupTheme {
MainMenuCanvas()
}
}
}