Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
F#ing

Andres G. Aragoneses knocte

💭
F#ing
View GitHub Profile
View gist:5d189a822dd139ccdf30b3c633fc8ee4
gist created to add just this image related to pair programming:
View gist:8b812a0996abad7d80a0262cb44b9b24
Code:
```
match foo with
| Bar (baz) -> ()
| _ ->
failwith "xxx"
```
Current results:
```
View gist:4aabc711a6c202a348b1dda1574e1a5c
diff --git a/STUN/STUNClient.cs b/STUN/STUNClient.cs
index 280a2cc..1d1c51d 100644
--- a/STUN/STUNClient.cs
+++ b/STUN/STUNClient.cs
@@ -30,7 +30,7 @@ namespace STUN
/// </param>
public static Task<STUNQueryResult> QueryAsync(IPEndPoint server, STUNQueryType queryType, bool closeSocket)
{
- return Task.Run(() => Query(server, queryType, closeSocket));
+ return Task.Run(() => QueryInternal(server, queryType, closeSocket));
View gist:5bbf7bcaa12845d3c9561d30eb7dbd47
$ mono p2pcopy.exe receiver
Contacting STUN servers to obtain your IP
Your firewall is FullCone
Tell this to your peer: 81.34.138.15:54852
Enter the ip:port of your peer: 93.110.84.141:49313
Contacting STUN servers to obtain your IP
Your firewall is FullCone
[6:23:19 PM] - Waiting 1 sec to sync with other peer
View gist:824b052d8113275e21f47634456cac83
diff --git a/src/TgSharp.TL/TLContext.cs b/src/TgSharp.TL/TLContext.cs
index 2d04707..a13a66f 100644
--- a/src/TgSharp.TL/TLContext.cs
+++ b/src/TgSharp.TL/TLContext.cs
@@ -19,7 +19,9 @@ namespace TgSharp.TL
where t.IsSubclassOf(typeof(TLObject))
where t.GetCustomAttribute(typeof(TLObjectAttribute)) != null
select t).ToDictionary(x => ((TLObjectAttribute)x.GetCustomAttribute(typeof(TLObjectAttribute))).Constructor, x => x);
- Types.Add(481674261, typeof(TLVector<>));
+ if (!Types.ContainsKey (481674261)) {
View gist:1815e794747238877ccb98015c07ec2e
diff --git a/src/TgSharp.TL/TLContext.cs b/src/TgSharp.TL/TLContext.cs
index 2d04707..1abe6c7 100644
--- a/src/TgSharp.TL/TLContext.cs
+++ b/src/TgSharp.TL/TLContext.cs
@@ -19,7 +19,7 @@ namespace TgSharp.TL
where t.IsSubclassOf(typeof(TLObject))
where t.GetCustomAttribute(typeof(TLObjectAttribute)) != null
select t).ToDictionary(x => ((TLObjectAttribute)x.GetCustomAttribute(typeof(TLObjectAttribute))).Constructor, x => x);
- Types.Add(481674261, typeof(TLVector<>));
+ Types[481674261] = typeof(TLVector<>);
View gist:d30ca67e3b7fc32def1a85dbf43564d4
From 3caa604be0918f8b264984451348735f30faab2b Mon Sep 17 00:00:00 2001
From: "Andres G. Aragoneses" <knocte@gmail.com>
Date: Mon, 8 Jun 2020 00:50:05 +0800
Subject: [PATCH 1/3] Backend,Frontend.Console: improve B's API so that F.C.'s
doesn't need refs
Improve the API design of GWallet.Backend project so that
GWallet.Frontend.Console doesn't need to reference directly
some sub-dependencies of GWallet.Backend, such as NBitcoin
and DotNetLightning.
View gist:6cd5361a2d08d074f5493a331b7c1885
fantomas was formatting records this way:
```
type Foo =
{ Bar: Baz
Bar2: Baz2 }
```
and with this new setting they are like:
@knocte
knocte / gist:b26c03f8c9688932badc6acceaee3cd4
Last active May 11, 2020
geewallet log when opening a channel with 0382019f91e0d8a5e497849052b5bedad4329bc88ca24b5dbf499c0bea1af5b6c5@172.81.182.181:9735
View gist:b26c03f8c9688932badc6acceaee3cd4
Available operations:
0: Exit
1: Refresh
3: Send payment
4: Add readonly accounts
5: Sign off payment
6: Broadcast payment
7: Archive account
8: Pair to watch wallet