Skip to content

Instantly share code, notes, and snippets.

View softlion's full-sized avatar

ZeBen softlion

View GitHub Profile
@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 / 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 / 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 / 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
{
@softlion
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
softlion / log vs2017.txt
Last active November 28, 2018 08:10
Infos
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
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;