Skip to content

Instantly share code, notes, and snippets.

View codejunk1e's full-sized avatar
☠️

Igboanyika Nnaemeka Robin codejunk1e

☠️
View GitHub Profile

1. Store api keys in a xml file

Put xml file "api_keys.xml" in the directory "res/value/".

api_keys.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="THE_MOVIE_DB_API_TOKEN">XXXXX</string>
</resources>
@alexito4
alexito4 / markAllFilesAsViewed.js
Created October 15, 2019 09:28
GitHub PR Mark ALL files as viewed
for (const checkbox of document.querySelectorAll('.js-reviewed-checkbox')) {
if (checkbox.attributes["data-ga-click"].value.includes("value:false")) {
checkbox.click();
}
}
@Dambakk
Dambakk / BallGrid.kt
Created March 4, 2021 08:00
Ball grid animation
@OptIn(ExperimentalFoundationApi::class)
@Composable
fun AnimatedBallGrid(
numBalls: Int = 32,
numBallsPrRow: Int = 7,
) {
// viewModel contains an observable list of balls
val viewModel: BallsViewModel by remember { mutableStateOf(BallsViewModel(numBalls)) } // TODO: Use injection instead
var animationSpeed: AnimationSpeed by remember { mutableStateOf(AnimationSpeed.Fast) }
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.animation.core.Animatable
import androidx.compose.animation.core.Spring
import androidx.compose.animation.core.VectorConverter
import androidx.compose.animation.core.spring
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.gestures.awaitFirstDown
import androidx.compose.foundation.gestures.forEachGesture