Skip to content

Instantly share code, notes, and snippets.

@MSiccDev
MSiccDev / CoinPaprika_Supported_Fiats.json
Last active Feb 14, 2020
List of supported Fiats on CoinPaprika API (api.coinpaprika.com)
View CoinPaprika_Supported_Fiats.json
{
"USD": {
"id": "usd-us-dollars",
"name": "US Dollar",
"symbol": "USD"
},
"EUR": {
"id": "eur-euro",
"name": "Euro",
"symbol": "EUR"
@MSiccDev
MSiccDev / chksyncstate.sh
Last active Sep 8, 2019
Script to check the current sync state of bitcoin and similar nodes
View chksyncstate.sh
#based on samples I found here:
#https://bitcoin.stackexchange.com/questions/37815/how-to-know-if-bitcoind-synced
#https://bitcoin.stackexchange.com/questions/10859/how-to-check-bitcoind-block-chain-download-progress-level/12734#12734
#you may not need sudo if you are running bitcoind as local user instead of using bitcoin.service
#as local user, the cli is found in /usr/local/bin, change commented lines below
#!/bin/bash
coin="$1";
if [ -z $coin ]; then
@MSiccDev
MSiccDev / blockchainexplorers.json
Last active Jun 26, 2019
Continuously updated list of blockchain explorers that can easily be used in applications.
View blockchainexplorers.json
{
"BTC": [
{
"Name": "Blockchain",
"BaseUrl": "https://blockchain.com",
"Currency": "btc",
"TransactionSuffix": "tx",
"TxIdIsQueryParameter": false
},
{
View blockstackverification
Verifying my Blockstack ID is secured with the address 12YzRCKWRdJzf4cfpBP5JX4ac4GfbzpWA9 https://explorer.blockstack.org/address/12YzRCKWRdJzf4cfpBP5JX4ac4GfbzpWA9
@MSiccDev
MSiccDev / XamarinMultiTargetTemplate.csproj
Last active Aug 6, 2019
Sdk style csproj template that includes resources as well, plus compiles against Android Oreo, UWP Fall Creators Update and iOS 10
View XamarinMultiTargetTemplate.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!--Work around so the conditions work below-->
<TargetFrameworks></TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">netstandard1.4;MonoAndroid81;Xamarin.iOS10;uap10.0.16299;</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard1.4;MonoAndroid81;Xamarin.iOS10;</TargetFrameworks>
<AssemblyName>[Insert here]</AssemblyName>
<RootNamespace>[Insert here]</RootNamespace>
@MSiccDev
MSiccDev / Xamarin.iOS.PlatformEncryptionKeyHelper.cs
Last active Apr 27, 2018
Helper class to securely create encryption keys without the need of user interaction on iOS. There are way to much samples that use some hardcoded values which could be compromised. The keys of this class are only available for usage within the app via KeyChain that created them, but can be synced across devices with the right Entitlements.
View Xamarin.iOS.PlatformEncryptionKeyHelper.cs
using System;
using System.Collections;
using System.Collections.Generic;
using Security;
using Foundation;
using System.Diagnostics;
using System.Linq;
using ObjCRuntime;
namespace [YOURNAMESPACEHERE]
@MSiccDev
MSiccDev / Xamarin.Android.PlatformEncryptionKeyHelper.cs
Last active Apr 9, 2019
Helper class to securely create encryption keys without the need of user interaction on Android. There are way to much samples that use some hardcoded values which could be compromised. The keys of this class are only available for usage within the app that created them. Plus, if the app gets uninstalled, the keys get deleted.
View Xamarin.Android.PlatformEncryptionKeyHelper.cs
using Android.Content;
using Android.OS;
using Android.Security;
using Android.Security.Keystore;
using Java.Math;
using Java.Security;
using Javax.Security.Auth.X500;
using Calendar = Android.Icu.Util.Calendar;
using CalendarField = Android.Icu.Util.CalendarField;
@MSiccDev
MSiccDev / EasyLayout.cs
Created Mar 5, 2018 — forked from praeclarum/EasyLayout.cs
EasyLayout makes writing auto layout code in Xamarin.iOS easier. See [the example](https://gist.github.com/praeclarum/8185036) for hints on how to use this library.
View EasyLayout.cs
//
// Copyright (c) 2013-2015 Frank A. Krueger
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
View Liberal Regex Pattern for Web URLs
The regex patterns in this gist are intended only to match web URLs -- http,
https, and naked domains like "example.com". For a pattern that attempts to
match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502
# Single-line version:
(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s