View s1-metrics-collector.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sentinelctl metrics enable ; sentinelctl metrics dump > /tmp/metrics.json ; count=0 ; while :; do clear; sentinelctl metrics dump > /tmp/metrics-tmp.log ; if grep -q "no metrics available" /tmp/metrics-tmp.log; then echo "Metrics Disabled" ; exit ; fi ; if [ $count = 0 ]; then echo "Starting Metrics Collection" ; count=$((count + 10)) ; else echo "Metrics have been collected for $count seconds" ; count=$((count + 10)) ; fi ; sleep 3 ; diff -u /tmp/metrics.json /tmp/metrics-tmp.log > /tmp/metrics-new.patch ; patch /tmp/metrics.json /tmp/metrics-new.patch ; sleep 3 ; echo "Collecting Metrics & writing to /tmp/metrics.json" ; sleep 4 ; done |
View CssProperties.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export {}; | |
export type PropertyValue<TValue> = TValue extends Array<infer AValue> | |
? Array<AValue extends infer TUnpacked & {} ? TUnpacked : AValue> | |
: TValue extends infer TUnpacked & {} | |
? TUnpacked | |
: TValue; | |
export type Fallback<T> = { [P in keyof T]: T[P] | NonNullable<T[P]>[] }; |
View GuidedWorkoutFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GuidedWorkoutFragment : TonalFragment(R.layout.guided_workout_fragment) { | |
override val daggerComponent: GuidedWorkoutMergeComponent by fragmentComponent { scope, app -> | |
app.bindings<GuidedWorkoutMergeComponent.Parent>().guidedWorkoutComponentBuilder() | |
.coroutineScope(WorkoutCoroutineScope(scope)) | |
.args(arg) | |
.build() | |
} | |
} |
View ContributesApiCodeGenerator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tonal.trainer.anvilcompilers | |
import com.google.auto.service.AutoService | |
import com.squareup.anvil.annotations.ContributesTo | |
import com.squareup.anvil.compiler.api.AnvilContext | |
import com.squareup.anvil.compiler.api.CodeGenerator | |
import com.squareup.anvil.compiler.api.GeneratedFile | |
import com.squareup.anvil.compiler.api.createGeneratedFile | |
import com.squareup.anvil.compiler.internal.asClassName | |
import com.squareup.anvil.compiler.internal.buildFile |
View Simple.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Singleton | |
class LocationProvider @Inject constructor() { | |
suspend fun currentLocation(): Pair<Float, Float> = 123.456f to 789.012f | |
} | |
class WeatherApi @Inject constructor() { | |
suspend fun getWeather(latLng: Pair<Float, Float>): Float = 72f | |
} | |
class WeatherUseCase @Inject constructor( | |
private val locationProvider: LocationProvider, | |
private val weatherApi: WeatherApi, |
View WorkoutDetailsFragment.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.sun.tools.javac.resources.CompilerProperties | |
import javax.swing.text.View | |
data class WorkoutDetailsState( | |
val workout: Async<Workout> = Uninitialized, | |
) : MavericksState { | |
} | |
class WorkoutDetailsViewModel @Inject constructor( | |
@Assisted initialState: WorkoutState, |
View build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implementation "com.airbnb.android:lottie-compose:4.0.0" |
View animatable.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val anim = rememberLottieAnimatable() | |
LaunchedEffect(composition) { | |
anim.animate( | |
composition, | |
iterations = LottieConstants.IterateForever, | |
) | |
} |
View lottie.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.heart)) | |
val progress by animateLottieCompositionAsState( | |
composition, | |
iterations = LottieConstants.IterateForever, | |
) | |
LottieAnimation( | |
composition, | |
progress, | |
) |
View LottieAnimation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LottieAnimation( | |
composition, | |
progress, | |
) |
NewerOlder