Skip to content

Instantly share code, notes, and snippets.

#
#
#
# This example showcases usage of AsyncAPI for the purpose of describing a WebSocket API. It is based on a real public service maintained by company called Gemini that provides cryptocurency trading products. It uses AsyncAPI bindings.
#
# This AsyncAPI document describes their v1 of the API. The v2 is also available and changes in the way that it provides a multimessage channel, where you subscribe for messages by sending a subscription message instead of using query parameters. For example with multimessage channel check out this article https://www.asyncapi.com/blog/websocket-part2 about another real public API called Kraken
#
# All available learning materials about AsyncAPI and WebSocket are:
# - WebSocket, Shrek, and AsyncAPI - An Opinionated Intro article: https://www.asyncapi.com/blog/websocket-part1
# - Creating AsyncAPI for WebSocket API - Step by Step article: https://www.asyncapi.com/blog/websocket-part2
@akaegi
akaegi / NumberWithUnitPickerCell.cs
Created March 18, 2021 10:39
NumberWithUnitPicker
using AiForms.Renderers;
using Xamarin.Forms;
namespace AiForms.Renderers
{
public class NumberWithUnitPickerCell: NumberPickerCell
{
public static BindableProperty UnitProperty = BindableProperty.Create(nameof (Unit), typeof (string), typeof (NumberWithUnitPickerCell), "", BindingMode.TwoWay);
public string Unit
@akaegi
akaegi / Age.cs
Created March 3, 2021 13:41
Age calculation
using System;
using System.Diagnostics;
using System.Globalization;
namespace ToBeDefined
{
public static class Age
{
/// <summary>
/// Calculates the age given birthday and referenceDate strings in the form "yyyy-MM-dd".
@akaegi
akaegi / appcenter-post-build.sh
Last active December 7, 2021 14:11
Publish Android app bundle to Google App Center internal track
if [[ -z "$APPCENTER_PLAY_STORE_PUBLISH_TO_INTERNAL_TRACK" ]]; then
echo "Define environment variable APPCENTER_PLAY_STORE_PUBLISH_TO_INTERNAL_TRACK to run this post-build script."
exit 0
fi
PACKAGE_NAME=com.aa.xfspike
echo "Installing required Python packages"
pip3 install httplib2 google-api-python-client oauth2client