Skip to content

Instantly share code, notes, and snippets.

View CyrilNb's full-sized avatar
📱

Cyril CyrilNb

📱
  • Remoting
View GitHub Profile
name: Log Release
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
@remi-dupre
remi-dupre / steam-ankama-launcher.sh
Last active March 14, 2024 21:29
Get Dofus running on the SteamDeck
#!/bin/bash
# Runs Ankama Launcher on a steam deck by using existing Proton runtime.
#
# /!\ You must ensure that you have a Proton instance installed through
# steam before running this script.
DOWNLOAD_URL="https://launcher.cdn.ankama.com/installers/production/Ankama%20Launcher-Setup-x86_64.AppImage"
STEAM_COMMON="/home/deck/.local/share/Steam/steamapps/common"
# Init compatdata dir
CURR_DIR=`dirname ${BASH_SOURCE[0]}`
@okmanideep
okmanideep / EventQueue.kt
Last active January 5, 2023 15:27
Event abstraction for Jetpack Compose
import androidx.compose.runtime.*
import kotlinx.coroutines.CoroutineScope
@Stable
internal class Event<T>(val value: T)
class MutableEventQueue<T>
internal constructor(): EventQueue<T>() {
private val events = mutableListOf<Event<T>>()
private val nextEventAsState = mutableStateOf<Event<T>?>(null)
@nntrn
nntrn / espn-api-list.md
Last active May 10, 2024 02:07
List of nfl api endpoints from espn

List of NFL API Endpoints

This page has been updated a lot in the past 3 years. Older revisions you might like more than this one:

  • June 2021 - list of endpoints for other sports/leagues (i.e. basketball, baseball, lacrosse, rugby)
  • August 2021 - get historical fantasy league data
  • September 2021 - list of endpoints in plain text
  • May 2023 - collapsed endpoint response examples

Additional Resources

@gabrielemariotti
gabrielemariotti / README.MD
Last active March 7, 2024 07:50
How to use the ShapeableImageView.

The Material Components Library introduced with the 1.2.0-alpha03 the new ShapeableImageView.

In your layout you can use:

 <com.google.android.material.imageview.ShapeableImageView
      android:id="@+id/image_view"
      app:srcCompat="@drawable/..." />

Then in your code apply the ShapeAppearanceModel to define your custom corners:

ext {
compileSDKVersionValue = 29
minSDKVersionValue = 22
targetSDKVersionValue = 29
libraries = [
cardView : 'androidx.cardview:cardview:1.0.0',
androidXLegacySupport : 'androidx.legacy:legacy-support-v4:1.0.0',
androidXAppCompat : 'androidx.appcompat:appcompat:1.1.0',
@trenthudy
trenthudy / KotlinEnumClassGsonDeserializationTest.kt
Last active November 17, 2023 20:43
Deserializing Kotlin enum classes with Gson
package io.hudepohl
import com.google.gson.Gson
import com.google.gson.annotations.SerializedName
import com.google.gson.reflect.TypeToken
import org.junit.Assert.assertTrue
import org.junit.Test
private const val testJson =
"""
@ArthurNagy
ArthurNagy / RoundedBottomSheetDialogFragment.kt
Last active May 10, 2024 09:22
Rounded modal bottom sheet as seen in new Google products(Tasks, News, etc.), described in this article: https://medium.com/halcyon-mobile/implementing-googles-refreshed-modal-bottom-sheet-4e76cb5de65b
package com.your.package
import android.app.Dialog
import android.os.Bundle
import com.your.package.R
import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
/**
* BottomSheetDialog fragment that uses a custom
@joshisumit
joshisumit / python_request_create_gist.py
Last active April 5, 2024 17:38
Create GIST from your python code with python requests module and OAuth token.
'''
HTTP Reuests has following parameters:
1)Request URL
2)Header Fields
3)Parameter
4)Request body
'''
#!/usr/bin/env python
import requests