Skip to content

Instantly share code, notes, and snippets.

View wilinz's full-sized avatar

wilinz wilinz

  • Guilin University of Electronic Technology School of Artificial Intelligence
  • China Guilin
View GitHub Profile
schultek / selection_transformer.dart
Last active April 11, 2024 01:49
A widget that transforms the text selection when copied.
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
typedef SelectionTransform = String Function(Iterable<String>);
/// A widget that transforms the text selection when copied.
/// This uses the [SelectionContainer] with a custom [SelectionContainerDelegate] to override the
/// [getSelectedContent] method with a custom implementation.
wilinz /
Last active May 18, 2024 07:49
KONFeature / ComposeOverlayViewService.kt
Created June 28, 2022 21:34
Service ready to display complete view (with the right context to access the window manager and layout inflater if needed, but also access to a saved state registry and a view model store owner). Then a compose overlay service, that use the first one to push a compose view as system overlay, and also proposing a simple draggable box that can be …
import android.content.Intent
import android.os.IBinder
import android.view.Gravity
import android.view.WindowManager
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
handstandsam / MyLifecycleOwner.kt
Last active July 13, 2024 05:35
Jetpack Compose OverlayService. You have to have all the correct permissions granted and in your manifest, but if you do, this this will show a green box with "Hello" in it!
import android.os.Bundle
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleRegistry
import androidx.savedstate.SavedStateRegistry
import androidx.savedstate.SavedStateRegistryController
import androidx.savedstate.SavedStateRegistryOwner
internal class MyLifecycleOwner : SavedStateRegistryOwner {
private var mLifecycleRegistry: LifecycleRegistry = LifecycleRegistry(this)
private var mSavedStateRegistryController: SavedStateRegistryController = SavedStateRegistryController.create(this)
benoitpetit / docker-compose.yml
Last active July 16, 2024 02:39
complete Gitlab installation and a runner with docker
version: '4.5'
image: 'gitlab/gitlab-ce:latest'
restart: always
container_name: gitlab-web
hostname: ''
fire1ce / oh-my-zsh on openwrt or
Last active July 14, 2024 17:47
Install oh-my-zsh on openwrt/lede-project

Install oh-my-zsh on OpenWrt

Install Requirements Packages

opkg update && opkg install ca-certificates zsh curl git-http

Install oh-my-zsh

git config --global https.proxy
git config --global https.proxy
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy