Skip to content

Instantly share code, notes, and snippets.

View knocte's full-sized avatar
💭
F#ing

Andres G. Aragoneses knocte

💭
F#ing
View GitHub Profile
diff --git a/src/GWallet.Frontend.XF.Android/GWallet.Frontend.XF.Android.fsproj b/src/GWallet.Frontend.XF.Android/GWallet.Frontend.XF.Android.fsproj
index af6061c8264072b667c7e303f40e2db5346be50f..a9a17118d86a07e6a61c16c32426f1e8ea6c4349 100644
--- a/src/GWallet.Frontend.XF.Android/GWallet.Frontend.XF.Android.fsproj
+++ b/src/GWallet.Frontend.XF.Android/GWallet.Frontend.XF.Android.fsproj
@@ -17,6 +17,8 @@
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
+ <SelectedDevice>galaxy_nexus</SelectedDevice>
+ <DefaultDevice>galaxy_nexus</DefaultDevice>
/Users/x/.nuget/packages/microsoft.build.tasks.git/1.0.0-beta-63127-02/build/Microsoft.Build.Tasks.Git.targets(5,5): Error MSB4018: The "Microsoft.Build.Tasks.Git.LocateRepository" task failed unexpectedly.
System.BadImageFormatException: Method has no body
File name: 'LibGit2Sharp'
at LibGit2Sharp.Core.Proxy.git_buf_free (LibGit2Sharp.Core.Handles.GitBuf buf) [0x00000] in <06ab184b4ccd4259a7a7af2756f77645>:0
at LibGit2Sharp.Core.Handles.GitBuf.Dispose () [0x00000] in <06ab184b4ccd4259a7a7af2756f77645>:0
at LibGit2Sharp.Core.Proxy.ConvertPath (System.Func`2[T,TResult] pathRetriever) [0x0002e] in <06ab184b4ccd4259a7a7af2756f77645>:0
at LibGit2Sharp.Core.Proxy.git_repository_discover (LibGit2Sharp.Core.FilePath start_path) [0x00005] in <06ab184b4ccd4259a7a7af2756f77645>:0
at LibGit2Sharp.Repository.Discover (System.String startingPath) [0x00006] in <06ab184b4ccd4259a7a7af2756f77645>:0
at Microsoft.Build.Tasks.Git.GitOperations.LocateRepository (System.String directory) [0x00000] in /_/src/Micro
@knocte
knocte / I'm a hater of the sentence "use the right tool for the job"
Last active January 15, 2019 08:24
Rescued answer from stackexchange (which was deleted because the question was deleted....)
I'm a hater of the sentence "use the right tool for the job". Nowadays, any language can do pretty much anything you want to
do with it (except if the language has recently been created and is still in the early stages, i.e.: Rust).
So then IMO these days what you have to do to choose your programming language is not ask what you're going to do, but know
what you want to avoid.
So I use this rule of thumb:
* Do I want to avoid paying licenses (or resorting to piracy if I'm in the early days of a startup and I don't want to spend
money), then I choose a language and a set of tools which have open source implementations (compiler and class libraries)
```
--------- beginning of system
12-28 15:11:18.006 2471 2639 I NetworkStatsRecorder: recordSnapshotLocked: ident[[{type=WIFI, subType=COMBINED, networkId="knocte BlackBerry BBF100-6 f9a6", metered=true}]]
12-28 15:11:18.006 2471 2639 I chatty : uid=1000(system) NetworkStats identical 1 line
12-28 15:11:18.006 2471 2639 I NetworkStatsRecorder: recordSnapshotLocked: ident[[{type=WIFI, subType=COMBINED, networkId="knocte BlackBerry BBF100-6 f9a6", metered=true}]]
12-28 15:11:18.006 2471 2639 W NetworkStatsRecorder: unknown interfaces [p2p0, lo, vt_data0, ccmni0], ignoring those stats
12-28 15:11:18.007 2471 2639 I NetworkStatsRecorder: recordSnapshotLocked: ident[[{type=WIFI, subType=COMBINED, networkId="knocte BlackBerry BBF100-6 f9a6", metered=true}]]
12-28 15:11:18.007 2471 2639 W NetworkStatsRecorder: unknown interfaces [p2p0, lo, vt_data0, ccmni0], ignoring those stats
12-28 15:11:18.670 418 418 E android.hardware.wifi@1.0-service: Invalid radio stats in link layer stats
@knocte
knocte / gist:73a7658d6ab1709811bf621762c2b059
Created December 4, 2018 03:31
patch for geewallet (frontend branch) to adopt bugfix in https://github.com/xamarin/Xamarin.Forms/issues/4030
diff --git a/NuGet.config b/NuGet.config
index c3edbdc..ca296e4 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
- <!--packageSources>
+ <packageSources>
+ <!-- using official Nethereum now
@knocte
knocte / gist:427f1e56b0374d9b5417f014e848136e
Created November 4, 2018 15:55
upgrade ZXing.Net.Xamarin dependency to version that includes macOS rendering support
diff --git a/src/GWallet.Frontend.XF.Mac/GWallet.Frontend.XF.Mac.fsproj b/src/GWallet.Frontend.XF.Mac/GWallet.Frontend.XF.Mac.fsproj
index 1b75dc2..cb2483a 100644
--- a/src/GWallet.Frontend.XF.Mac/GWallet.Frontend.XF.Mac.fsproj
+++ b/src/GWallet.Frontend.XF.Mac/GWallet.Frontend.XF.Mac.fsproj
@@ -169,16 +169,19 @@
<HintPath>..\..\packages\Nethereum.StandardTokenEIP20.3.0.0-rc3\lib\netstandard2.0\Nethereum.StandardTokenEIP20.dll</HintPath>
</Reference>
<Reference Include="ZXing.Net.Mobile.Core">
- <HintPath>..\..\packages\ZXing.Net.Xamarin.2.99.0-CI-20181103-165913\lib\netstandard1.0\ZXing.Net.Mobile.Core.dll</HintPath>
+ <HintPath>..\..\packages\ZXing.Net.Xamarin.2.99.0-CI-20181104-152016\lib\Xamarin.Mac\ZXing.Net.Mobile.Core.dll</HintPath>
@knocte
knocte / gist:cb5c54f8454c42bc3853de4e9af00736
Created October 19, 2018 11:51
NRE with System.IO.Pipelines 4.5.0
________________10-19 19:30:20.641 I/mono-stderr(23228): ________________
System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object10-19 19:30:20.691 I/mono-stderr(23228): System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object
at System.Buffers.ReadOnlySequence`1[T].TryGetBuffer (System.SequencePosition& position, System.ReadOnlyMemory`1[T]& memory, System.SequencePosition& next) [0x00044] in <f6dad3dbe4c6408e8a0f6ade27956b1c>:0
at System.Buffers.ReadOnlySequence`1[T].TryGet (System.SequencePosition& position, System.ReadOnlyMemory`1[T]& memory, System.Boolean advance) [0x00000] in <f6dad3dbe4c6408e8a0f6ade27956b1c>:0
at System.Buffers.BuffersExtensions.PositionOfMultiSegment[T] (System.Buffers.ReadOnlySeq
@knocte
knocte / gist:bc5003e1674a35f7528186105c30417d
Last active March 16, 2017 16:37
amazing convo in tumblebit.slack.com
knocte> this article claims that you have said that SegWit is not required for NTumbleBit; however, is that really true? if you have transaction malleability, you cannot really use any payment channel securely, right?
(https://stratisplatform.com/2016/12/07/anonymous-transactions-coming-to-stratis/
but AFAIU, even someone could malleate a transaction malliciously to break a uni-directional payment channel setup
they wouldn't be able to take your funds by doing that; but they would be able to freeze your funds (the ones you put in the payment channel) forever
(unless the operator of the tumbler is a nice guy and gives you an updated transaction signature to get your funds back at channel-expiry time)
but the point of payment channels is that they should be trustless... so again, AFAIU, you cannot have trustless payment channels (even unidirectional ones) with non-SegWit
ethan> SegWit is not required for TumbleBit. The freezing attack is not possible, but I think I understand the confusion.
The freezing attack
@knocte
knocte / gist:f8184d8531efe9ce82126a0905a09cdb
Last active November 12, 2016 16:06
electrum, trouble connecting, red ball
$ electrum -v
electrum directory /home/andres/.electrum
[Plugins] registering hardware keepkey: ('hardware', 'keepkey', u'KeepKey wallet')
[Plugins] registering hardware ledger: ('hardware', 'ledger', u'Ledger wallet')
[Plugins] registering hardware trezor: ('hardware', 'trezor', u'TREZOR wallet')
[Plugins] registering wallet type ('2fa', 'trustedcoin')
[profiler] __init__ 0.0029
[Network] starting network
[Network] connecting to electrum.jdubya.info:50002:s as new interface
[WalletStorage] wallet path /home/andres/.electrum/wallets/default_wallet
public class InternalElectronicAddressesResponse : CommonResponse
{
public List<InternalTraderElectronicWallet> Addresses { get; set; }
public List<WithdrawalLimit> WithdrawalLimits { get; set; }
public List<TotalWithdrawn> TotalWithdrawns { get; set; }
}
public class GetTicketsResponse : CommonResponse
{
public List<TraderTicket> Tickets { get; set; }