Skip to content

Instantly share code, notes, and snippets.

View softlion's full-sized avatar

ZeBen softlion

View GitHub Profile
softlion / RxButton.cs
Last active April 18, 2024 04:27
Button with HorizontalTextAlignmentProperty and VerticalTextAlignmentProperty
using Microsoft.Maui.Handlers;
using Google.Android.Material.Button;
#elif IOS
using UIKit;
using Microsoft.UI.Xaml.Controls;
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 / 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:
- release/store
vmImage: 'macos-latest'
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 / connect_linkedin.js
Created November 13, 2019 15:08 — forked from bertolo1988/connect_linkedin.js
Quickly your LinkedIn network
// 1. load
// 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 / 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
softlion / RealtimeBlurView.cs
Created February 25, 2019 13:26
Xamarin RealtimeBlurView
using System;
using Android.App;
using Android.Content;
using Android.Content.Res;
using Android.Graphics;
using Android.Renderscripts;
using Android.Runtime;
using Android.Util;
using Android.Views;
using R = VfrApp.Droid.Resource;
softlion / log vs2017.txt
Last active November 28, 2018 08:10
Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the NuGet Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
Running restore with 8 concurrent jobs.
Reading project file C:\Dev\repos\Company\Company.AirAppApp\AirApp.Core\AirApp.csproj.
Reading project file C:\Dev\repos\Company\Company.AirAppApp\AirApp.Droid\AirApp.Droid.csproj.
Reading project file C:\Dev\repos\Company\Company.AirAppApp\Company2.Toolbox\Company2.Toolbox.csproj.
Reading project file C:\Dev\repos\Company\Company.AirAppApp\AirApp.iOS\AirApp.iOS.csproj.
The restore inputs for 'Company2.Toolbox' have not changed. No further actions are required to complete the restore.
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: C:\Dev\repos\Company\Company.AirAppApp\Company2.Toolbox\obj\project.assets.json
softlion / ParallaxHeaderBehavior.cs
Created August 6, 2018 15:33
A Parallax header for your RecyclerView using a CoordinatorLayour Behavior (Android Development)
using System;
using Android.Content;
using Android.Runtime;
using Android.Support.Design.Widget;
using Android.Support.V4.View;
using Android.Support.V4.Widget;
using Android.Support.V7.Widget;
using Android.Util;
using Android.Views;
using Object = Java.Lang.Object;
softlion / poeditor-export.js
Created February 9, 2018 11:41
poeditor: export all projects/languages to resx files (or any format)
//Install nodejs and the npm dependencies:
//npm install node-poeditor
//npm install async-file
//npm install linq-es2015
//npm install requisition
//node poeditor-export.js
const token = 'you-api-token-here';