Skip to content

Instantly share code, notes, and snippets.

@Dominaezzz
Dominaezzz / AnimatedGif.kt
Last active September 7, 2024 18:16
Rendering GIF animation with compose
import androidx.compose.animation.core.*
import androidx.compose.desktop.Window
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
@IanColdwater
IanColdwater / twittermute.txt
Last active April 14, 2025 16:31
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@jongha
jongha / StringUtils.kt
Last active November 8, 2024 16:57
Remove trailing zeros in Kotlin
object StringUtils {
fun format(context: Context?, value: Float?): String? {
return trimZero(context?.resources?.getString(R.string.float_format, value ?: 0f))
}
fun format(context: Context?, value: Int?): String? {
return trimZero(context?.resources?.getString(R.string.int_format, value ?: 0))
}
fun trimTrailingZero(value: String?): String? {
@zbeekman
zbeekman / GH-CF-strict-SSL-w-CDN.md
Last active May 17, 2025 03:50
Setting up GH-pages with custom domain, strict (end-to-end) SSL with CloudFlare DNS & CDN

Custom domains, GH-pages, Cloudflare and strict SSL end-to-end encryption

Why I wrote this

Before Github supported SSL encryption for github pages sites, many people were using CloudFlare (CF) as their DNS provider and CDN proxy. CF allowed users to enable SSL encryption from the CDN end points/proxies to the end user. This was great and it allowed visitors to your website to connect with a secure connection between their browser and the cloudflare CDN box that was serving your content. However, with this setup one (significant) link in the chain remained unencrypted and