This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace FooBar.Extensions | |
{ | |
public static class ViewModelExtensions | |
{ | |
#region Static Methods | |
public static string GetExceptionMessage(this Exception exception) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
# User-specific files | |
*.suo | |
*.user | |
*.sln.docstates | |
*.userprefs | |
# ignore Xamarin.Android Resource.Designer.cs files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Put this inside App.xaml --> | |
<!-- if you don't know how to add App.xaml to your project use this guide: http://goo.gl/GuXMDD/> | |
<!-- Some default style resets --> | |
<Style TargetType="Grid"> | |
<Setter Property="Padding" | |
Value="0" /> | |
<Setter Property="RowSpacing" | |
Value="0" /> | |
<Setter Property="ColumnSpacing" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To use in react-native, choose from font below, and then add to style element: | |
<Text style={{ fontFamily: 'Arial' }}>Arial Font</Text> | |
Alternatively, add your own custom font face | |
Android: | |
======== | |
normal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Xamarin.Forms; | |
namespace cdm.xamarin.forms | |
{ | |
/// <summary> | |
/// Easily add grid rows and columns with this extension class | |
/// </summary> | |
public static class GridExtensions | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class DateTimeHelper | |
{ | |
private static readonly DateTime unixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); | |
/// <summary> | |
/// Return the number of seconds since Epoch (1st Jan 1970) | |
/// </summary> | |
/// <returns>Seconds since epoch</returns> | |
public static long SecondsSinceEpoch() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if DEBUG | |
Debug.WriteLine("Request:"); | |
Debug.WriteLine(request.ToString()); | |
if (request.Content != null) | |
{ | |
var bytes = await request.Content.ReadAsByteArrayAsync(); | |
Debug.WriteLine(bytes.Length); | |
Debug.WriteLine(Encoding.UTF8.GetString(bytes, 0, bytes.Length)); | |
Debug.WriteLine(await request.Content.ReadAsStringAsync()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import pandas | |
print("Loading $VEGA historic daily price data from CoinGecko API") | |
url = "https://api.coingecko.com/api/v3/coins/vega-protocol/market_chart?vs_currency=usd&days=max&interval=daily" | |
response = requests.get(url) | |
response_json = response.json() | |
dict = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import os | |
import requests | |
# ACCOUNT TYPES (DO NOT EDIT) | |
account_type_taker_fees = "ACCOUNT_TYPE_REWARD_TAKER_PAID_FEES" # Per asset reward account for fees paid by takers | |
account_type_maker_fees = "ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES" # Per asset reward account for fees received by makers | |
account_type_lp_fees = "ACCOUNT_TYPE_REWARD_LP_RECEIVED_FEES" # Per asset reward account for fees received by liquidity providers | |
account_type_market_proposers = "ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS" # Per asset reward account for market proposers when the market goes above a trading threshold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import os | |
import requests | |
transfer_id = "fa1a3ceb74b6b8b1525f44bf688569bcd8d7ca74a93cbcbbd8012001094e0a95" | |
node_url_rest = os.getenv("NODE_URL_REST") | |
wallet_server_url = os.getenv("WALLETSERVER_URL") | |
wallet_name = os.getenv("WALLET_NAME") | |
wallet_passphrase = os.getenv("WALLET_PASSPHRASE") |
OlderNewer