Skip to content

Instantly share code, notes, and snippets.

View androiddevnotes's full-sized avatar
🐣

Android Dev Notes androiddevnotes

🐣
View GitHub Profile
import android.graphics.Matrix
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.animation.core.LinearEasing
import androidx.compose.animation.core.RepeatMode
import androidx.compose.animation.core.animateFloat
import androidx.compose.animation.core.infiniteRepeatable
import androidx.compose.animation.core.rememberInfiniteTransition
import androidx.compose.animation.core.tween
@androiddevnotes
androiddevnotes / README.md
Created September 16, 2024 21:17
Automatically format Kotlin source files using ktlint before committing changes in a Git repository.

to use it:

  1. install ktlint first: brew install ktlint - if not on mac, use different installation: https://github.com/pinterest/ktlint

  2. modify your pre-commit file in .git folder

  3. create .editorconfig file in root of your project

example config of .editorconfig:

@androiddevnotes
androiddevnotes / pre-commit
Created September 17, 2024 00:13
Automatically format Swift source files using swift-format from SwiftLang before committing changes in a Git repository. Ensure you have swift-format installed
#!/bin/sh
# Format Swift files with swift-format before committing
git diff --name-only -z --cached -- '*.swift' | \
xargs -0 -I {} sh -c 'swift-format -i {} || exit $?'
# If swift-format fails (returns non-zero), the commit will be aborted
# Re-add the files to stage the changes made by swift-format
git diff --name-only -z --cached -- '*.swift' | \
@androiddevnotes
androiddevnotes / License.pdf
Created October 7, 2024 21:00
Apple SF Symbols License as of 10/07/2024
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.