Skip to content

Instantly share code, notes, and snippets.

View softlion's full-sized avatar
😇
Clauding ...

ZeBen softlion

😇
Clauding ...
View GitHub Profile
@softlion
softlion / ColorPickerPopup.xaml
Last active August 6, 2025 06:32
Maui color picker using GraphicsView (no SkiaSharp)
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:vm="clr-namespace:Vapolia.OustGame.ViewModels"
xmlns:controls="clr-namespace:Vapolia.OustGame.Views.Controls"
x:Class="Vapolia.OustGame.Views.ColorPickerPopup"
x:DataType="vm:ColorPickerPopupViewModel"
BackgroundColor="Transparent"
NavigationPage.HasNavigationBar="False">
<Grid BackgroundColor="#80000000">
@softlion
softlion / RxButton.cs
Last active July 30, 2024 04:01
Button with HorizontalTextAlignmentProperty and VerticalTextAlignmentProperty
using Microsoft.Maui.Handlers;
#if ANDROID
using Google.Android.Material.Button;
#elif IOS
using UIKit;
#elif WINDOWS
using Microsoft.UI.Xaml.Controls;
#endif
@softlion
softlion / solflare2helium.py
Created May 24, 2024 22:14
CONVERT SOLFLARE PRIVATE KEY FORMAT (decimal json) INTO HELIUM WALLET PRVATE KEY FORMAT (base58)
#CONVERT SOLFLARE PRIVATE KEY FORMAT (decimal json) INTO HELIUM WALLET PRVATE KEY FORMAT (base58)
#pip install base58
import json
import base58
# Your Solana private key as a JSON array of integers
solana_private_key_json = '[79, 60, 46, 159, 168, 210, 229, 181, 155, 62, 45, 118, 26, 77, 75, 81, 205, 71, 201, 184, 159, 45, 110, 19, 200, 162, 167, 210, 229, 181, 195, 214]'
# Parse the JSON array to a list of integers
@softlion
softlion / SkottieView.cs
Created March 8, 2024 20:17
SkottieView for Maui (replaces LottieXamarin)
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Reflection;
using SkiaSharp;
using SkiaSharp.Views.Maui;
using Animation = SkiaSharp.Skottie.Animation;
namespace Skottie;
/// <summary>
@softlion
softlion / azure-pipeline.yaml
Created February 20, 2024 17:05
Build a xamarin iOS app for release and publish it to testflight via AppCenter Distribute
# Xamarin.iOS
# Build a Xamarin.iOS project.
# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/xamarin
trigger:
- release/store
pool:
vmImage: 'macos-latest'
@softlion
softlion / IScreenLocation.cs
Last active February 6, 2022 10:58
Xamarin Forms get absolute bounds of a control and display a menu at this location
namespace Vapolia
{
public interface IScreenLocation
{
PointF GetCoordinates(VisualElement view);
}
}
@softlion
softlion / MvxRadioGroupSelectedIndexBinding.cs
Last active May 13, 2021 18:59
mvvmcross : Bind a static RadioGroup using zero based indexes
/// <summary>
/// Author: softlion (softlion@softlion.com)
/// </summary>
/// <remarks>
/// Thanks to: Stuart Lodge
/// </remarks>
public class MvxRadioGroupSelectedIndexBinding : MvxAndroidTargetBinding
{
bool stopListeningCheckChanged = false;
@softlion
softlion / MyTabbedRenderer.Droid.cs
Last active September 29, 2020 05:14
Custom Tabbed Renderer for Xamarin Forms to display Svg icons using XamSvg
using System.Threading;
using Android.App;
using Android.Graphics;
using Android.OS;
using Android.Util;
using Android.Views;
using Vapolia.Droid.Lib.Renderers;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
using XamSvg;
@softlion
softlion / connect_linkedin.js
Created November 13, 2019 15:08 — forked from bertolo1988/connect_linkedin.js
Quickly your LinkedIn network
// 1. load https://www.linkedin.com/mynetwork/
// 2. make sure your LinkedIn is in English
// 3. paste this script on chrome dev tools at your own risk
async function moreConnectionsPlease() {
// maximum limit of Connect buttons clicked
const LIMIT = 500;
// wait in ms before each scroll
const SCROLL_TIMEOUT = 600;
// bulk scroll will scroll this amount of times
@softlion
softlion / ShimmerExtensions.cs
Created October 14, 2019 13:48
Xamarin Shimmer
//Xamarin iOS
using System;
using System.Runtime.InteropServices;
using CoreAnimation;
using CoreGraphics;
using Foundation;
using UIKit;
namespace Vapolia.Ios.Lib.Ui
{