Skip to content

Instantly share code, notes, and snippets.

View Coding-Enthusiast's full-sized avatar
:atom:
Busy Busy Busy

Coding Enthusiast Coding-Enthusiast

:atom:
Busy Busy Busy
  • Autarkysoft
View GitHub Profile
@Coding-Enthusiast
Coding-Enthusiast / BitwiseOperations.md
Last active April 25, 2024 12:53
Bitwise operations cheat sheet

AND (&)

100  
101  
---  
100  

OR (|)

100  
101  
---  

101

@Coding-Enthusiast
Coding-Enthusiast / BitcoinCoreMiningBug.cs
Created February 23, 2021 08:18
Testing coinbase maturity on RegTest to be used in Bitcoin.Net CoinbaseQueue class
// Copyright (c) 2021 Autarkysoft
// Distributed under the MIT software license.
// See http://www.opensource.org/licenses/mit-license.php.
// This is using Bitcoin.Net 0.9.0
// Install from nuget using `Install-Package Autarkysoft.Bitcoin -Version 0.9.0`
using Autarkysoft.Bitcoin;
using Autarkysoft.Bitcoin.Blockchain.Blocks;
using Autarkysoft.Bitcoin.Blockchain.Scripts;
using Autarkysoft.Bitcoin.Blockchain.Transactions;
@Coding-Enthusiast
Coding-Enthusiast / gist:8339f64c736053107f0d918675c186e0
Created August 30, 2020 05:01
515 valid keys are recovered from a WIF missing 7 chars
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc13VAyRT
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc15Lpsww
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1GjcJ1z
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1JmgZj1
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1TgSYfK
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1YH8BhJ
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1eGCVAm
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1oGcLBe
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc1u5JfVe
5KMWmYkn5YWkJnUDG4utD9L1HXQv3DBseqqCGsQXmthc218erjy
@Coding-Enthusiast
Coding-Enthusiast / AddressPlayground.cs
Created June 8, 2020 15:46
Showcase bitcoin address creation using any script
using Autarkysoft.Bitcoin;
using Autarkysoft.Bitcoin.Blockchain;
using Autarkysoft.Bitcoin.Blockchain.Scripts;
using Autarkysoft.Bitcoin.Blockchain.Scripts.Operations;
using Autarkysoft.Bitcoin.Cryptography.Asymmetric.KeyPairs;
using Autarkysoft.Bitcoin.Cryptography.Hashing;
using Autarkysoft.Bitcoin.Encoders;
public class AddressPlayground
{
@Coding-Enthusiast
Coding-Enthusiast / Sha512.cs
Created May 8, 2019 06:16
Unsafe implementation of some hash functions
using System;
using System.Runtime.CompilerServices;
namespace Autarkysoft.Cryptocurrency.Cryptography.Hashing
{
/// <summary>
/// https://tools.ietf.org/html/rfc6234
/// </summary>
public class Sha512 : IHashFunction, IDisposable
{
@Coding-Enthusiast
Coding-Enthusiast / Schnorr.cs
Last active February 21, 2019 07:33
Schnorr signatures using MuSig and the simple collective signature proposed for Ed25519 before
using Autarkysoft.Cryptocurrency; // Library not public yet!
using Autarkysoft.Cryptocurrency.Coins;
using Autarkysoft.Cryptocurrency.Cryptography.Asymmetric.EllipticCurve;
using Autarkysoft.Cryptocurrency.Cryptography.Hashing;
using Autarkysoft.Cryptocurrency.Extensions;
using Autarkysoft.Cryptocurrency.KeyPairs;
using System;
using System.Numerics;
namespace TestLibrary
@Coding-Enthusiast
Coding-Enthusiast / MiniPrivateKey.cs
Created November 23, 2018 04:39
MiniPrivateKey class from CryptoCurrency.Net library.
using CryptoCurrency.Net.Coins;
using CryptoCurrency.Net.Extensions;
using CryptoCurrency.Net.Hashing;
using System;
using System.Linq;
using System.Text;
namespace CryptoCurrency.Net.KeyPairs
{
/// <summary>
@Coding-Enthusiast
Coding-Enthusiast / Fibonachi.cs
Last active August 30, 2017 01:27
Find the closest Fibonacci number
using System;
using System.Collections.Generic;
namespace Fibonachi
{
class Program
{
static void Main(string[] args)
{
Console.Write("Number: ");
@Coding-Enthusiast
Coding-Enthusiast / InpcBase.cs
Created April 29, 2017 15:47
Base class for MVVM
public class InpcBase : INotifyPropertyChanged
{
public InpcBase()
{
PropertyDependencyMap = new Dictionary<string, List<string>>();
foreach (var property in GetType().GetProperties())
{
var attributes = property.GetCustomAttributes<DependsOnPropertyAttribute>();
foreach (var dependsAttr in attributes)
<Window x:Class="TestIconvert.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:TestIconvert"
Title="MainWindow" Height="350" Width="525">
<Window.DataContext>
<vm:MainWindowViewModel/>
</Window.DataContext>
<Window.Resources>
<vm:CustomConverter x:Key="myConverter"/>