Skip to content

Instantly share code, notes, and snippets.

View safu9's full-sized avatar

safu9 safu9

  • Japan
View GitHub Profile
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.gestures.FlingBehavior
import androidx.compose.foundation.gestures.ScrollableDefaults
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyItemScope
import androidx.compose.foundation.lazy.LazyListScope
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.rememberLazyListState
@safu9
safu9 / AppUploader.cs
Last active October 20, 2022 10:55
AAB (Android App Bundle) Uploader for Unity
// Original: https://medium.com/@espresso3389/7d39c2258723
using Google.Apis.AndroidPublisher.v3;
using Google.Apis.AndroidPublisher.v3.Data;
using Google.Apis.Auth.OAuth2;
using Google.Apis.Services;
using Google.Apis.Upload;
using System;
using System.Collections.Generic;
using System.IO;
@safu9
safu9 / mixins.py
Created March 9, 2018 05:07
Django Mixin for Redirect
from django.shortcuts import redirect
class RedirectMixin:
"""
Redirect to redirect_url if the test_func() method returns False.
"""
redirect_url = None
def get_redirect_url(self):
@safu9
safu9 / mixins.py
Last active February 17, 2018 03:53
Django FormMixin that can process GET request
from django.views.generic.edit import FormMixin
# Mixin to process form by GET
class GetFormMixin(FormMixin):
# Override
def get_form_kwargs(self):
"""Return the keyword arguments for instantiating the form."""
kwargs = {
'initial': self.get_initial(),
'prefix': self.get_prefix(),