Skip to content

Instantly share code, notes, and snippets.

View yuvaraj119's full-sized avatar
๐Ÿ˜
Life is a Race

Yuvaraj Yadav yuvaraj119

๐Ÿ˜
Life is a Race
View GitHub Profile
@voghDev
voghDev / BaseTest.kt
Last active July 13, 2025 04:26
Quick workaround to mock a context.getResources().getStringArray(...), in Kotlin
@Mock
lateinit var mockContext: Context
@Mock
lateinit var mockResources: Resources
@Before
fun setUp() {
MockitoAnnotations.initMocks(this)
}
@troyfontaine
troyfontaine / 1-setup.md
Last active August 2, 2025 02:17
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@Antarix
Antarix / horizontal_progress_demo.xml
Last active February 16, 2022 08:54
Android Custom horizontal ProgressBar emample
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ProgressBar
android:id="@+id/progress_limit"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"