Skip to content

Instantly share code, notes, and snippets.

View Sardorbekcyber's full-sized avatar
🎯
Growing

Sardor Narziyev Sardorbekcyber

🎯
Growing
View GitHub Profile
@Sardorbekcyber
Sardorbekcyber / multiple-ssh-keys-git.adoc
Created October 26, 2023 12:09 — forked from alejandro-martin/multiple-ssh-keys-git.adoc
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

@Sardorbekcyber
Sardorbekcyber / colorUtils.kt
Created May 28, 2021 06:10 — forked from karangoel16/colorUtils.kt
ColorWithTransparency
fun String.toTransparentColor(num: Int): String {
return "#" + when (num) {
100 -> "FF"
99 -> "FC"
98 -> "FA"
97 -> "F7"
96 -> "F5"
95 -> "F2"
94 -> "F0"
@Sardorbekcyber
Sardorbekcyber / fadeTo.kt
Created May 21, 2021 18:18 — forked from gpeal/fadeTo.kt
Fade To
/**
* Fade a view to visible or gone. This function is idempotent - it can be called over and over again with the same
* value without affecting an in-progress animation.
*/
fun View.fadeTo(visible: Boolean, duration: Long = 500, startDelay: Long = 0, toAlpha: Float = 1f) {
// Make this idempotent.
val tagKey = "fadeTo".hashCode()
if (visible == isVisible && animation == null && getTag(tagKey) == null) return
if (getTag(tagKey) == visible) return