Skip to content

Instantly share code, notes, and snippets.

View moshenskyi's full-sized avatar

Nazarii Moshenskyi moshenskyi

View GitHub Profile
@moshenskyi
moshenskyi / LensEffectShader.kt
Created June 7, 2026 08:56
AGSL Lens Effect Shader
/*
* Copyright 2026 Nazarii Moshenskyi
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2026 Nazarii Moshenskyi
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@moshenskyi
moshenskyi / TracingInterceptor.kt
Created December 24, 2025 16:33
Adds `OkHttp` network calls to a `Perfetto` trace
import android.os.Trace
import okhttp3.Interceptor
import okhttp3.Response
import java.io.IOException
class TracingInterceptor : Interceptor {
@Throws(IOException::class)
override fun intercept(chain: Interceptor.Chain): Response {
val request = chain.request()