Skip to content

Instantly share code, notes, and snippets.

View JBou's full-sized avatar

Gabriel Patzleiner JBou

  • 11:18 (UTC +02:00)
View GitHub Profile
@Renegade605
Renegade605 / zfs_error_check.sh
Last active May 5, 2025 08:38
Unraid ZFS Error Notifications
#!/bin/bash
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# UNRAID ZFS ERROR NOTIFICATION SCRIPT #
# #
# Author: Renegade605 #
# GitHub: https://gist.github.com/Renegade605/8a2d41cc93fa9f01670fc9ba34177c3c #
# Last Updated: 2024-02-28 #
@Composable
fun LocationDisplay(activity: ComponentActivity) {
// Create a conflated channel for location updates
val locationChannel = remember { Channel<Location>(Channel.CONFLATED) }
// Create a mutable state for the location text
val locationState = remember { mutableStateOf("") }
// Receive location updates from the channel using a coroutine
LaunchedEffect(locationChannel) {
val scope = CoroutineScope(Dispatchers.Default)
@Shuggy999
Shuggy999 / italiantv.m3u
Created April 17, 2023 19:10
my iptv playlist
#EXTM3U
#EXTINF:-1,Rai 1 HD [1]
https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=2606803&output=16
#EXTINF:-1,Rai 2 HD [2]
https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=308718&output=16
#EXTINF:-1,Rai 3 HD [3]
https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=308709&output=16
@pesterhazy
pesterhazy / building-sync-systems.md
Last active July 28, 2025 15:53
Building an offline realtime sync engine

So you want to write a sync system for a web app with offline and realtime support? Good luck. You might find the following resources useful.

Overview articles

@steelproxy
steelproxy / edtr.command
Created December 8, 2021 05:52
Script I created to get unlimited free ExpanDrive5 trials with on macOs, don't know if it still works.
clear
printf "Would you like to reset your ExpanDrive trial? (y/n): "
read PROMPT
if [ "$PROMPT" != "y" ]
then
exit
fi
printf "Killing ExpanDrive... "
pkill ExpanDrive
printf "Killed!\nResetting... "
@jaylinski
jaylinski / kodi.strm
Last active April 21, 2025 15:51
Kodi playlist containing free and public TV streams from DE/AT/CH with DRM support.
#KODIPROP:inputstream=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=com.widevine.alpha
#KODIPROP:inputstream.adaptive.license_key=https://drm.ors.at/acquire-license/widevine?BrandGuid=13f2e056-53fe-4469-ba6d-999970dbe549&userToken=<token>||R{SSM}|
https://orf1.mdn.ors.at/out/u/orf1/drmqxa/manifest.mpd
@denis-ismailaj
denis-ismailaj / LabelledCheckBox.kt
Last active November 13, 2024 19:38
LabelledCheckBox in Jetpack Compose
@Composable
fun LabelledCheckBox(
checked: Boolean,
onCheckedChange: ((Boolean) -> Unit),
label: String,
modifier: Modifier = Modifier
) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = modifier
@ScottPierce
ScottPierce / RotateScreen.kt
Created February 12, 2021 02:15
Jetpack Compose Screen Rotation
@Composable
fun RotateScreen(
rotation: ScreenRotation,
modifier: Modifier = Modifier,
contentAlignment: Alignment = Alignment.TopStart,
content: @Composable () -> Unit
) {
BoxWithConstraints {
val width: Dp
val height: Dp
@aartikov
aartikov / DelegateAccess.kt
Created January 14, 2021 11:03
Wrap MutableStateFlow to property delegate
internal object DelegateAccess {
internal val delegate = ThreadLocal<Any?>()
internal val delegateRequested = ThreadLocal<Boolean>().apply { set(false) }
}
internal val <T> KProperty0<T>.delegate: Any?
get() {
try {
DelegateAccess.delegateRequested.set(true)
this.get()
@rordi
rordi / root-password-MariaDB-docker-compose.md
Last active May 20, 2025 14:23
Change root password in MariaDB Docker container running with docker-compose

Change root password in MariaDB Docker container running with docker-compose

Override the entrypoint in docker-compose.yml for the MariaDB Docker container by adding:

entrypoint: mysqld_safe --skip-grant-tables --user=mysql

The start up the Docker Compose stack:

$> docker-compose up -d