This file contains hidden or 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 System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using Open.Nat; | |
| namespace ConsoleApplication3 | |
| { | |
| class Program |
This file contains hidden or 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
| run=(code, input)-> | |
| [dptr, cptr, marks, mem, output, stack]=[0, 0, [], (0 for [1..100]), [], []] | |
| for cmd, pos in code | |
| if cmd is '[' then stack.push(pos) | |
| if cmd is ']' then marks[marks[pos] = stack.pop()]=pos | |
| while cptr < code.length | |
| switch code[cptr] | |
| when '+' then mem[dptr] = mem[dptr] + 1 or 1 |
This file contains hidden or 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 hashlib | |
| import binascii | |
| p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F | |
| n = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 | |
| G = (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798, 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8) | |
| def point_add(p1, p2): | |
| if (p1 is None): | |
| return p2 |
This file contains hidden or 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
| require 'fileutils' | |
| Vagrant.configure("2") do |config| | |
| config.vm.box = "ubuntu/xenial64" | |
| config.vm.network "forwarded_port", guest: 80, host: 8080 | |
| config.vm.provider "virtualbox" do |vb| | |
| vb.memory = "4096" | |
| vb.gui = true |
This file contains hidden or 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
| #!/bin/bash | |
| COMPlus_PerfMapEnabled=1 dotnet ~/GitHub/WalletWasabi/WalletWasabi.Gui/bin/Debug/netcoreapp2.1/WalletWasabi.Gui.dll & | |
| sudo perf record -p $! -g | |
| sudo perf script -f | ~/GitHub/FlameGraph/stackcollapse-perf.pl | ~/GitHub/FlameGraph/flamegraph.pl > flame.svg | |
| sudo python -m SimpleHTTPServer 80 |
This file contains hidden or 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
| bbcli="bitcoin-cli -regtest -datadir=/home/lontivero/tmp/bitcoind" | |
| miner_address=$($bbcli getnewaddress) | |
| address=$($bbcli getnewaddress) | |
| generated_blocks=$($bbcli generatetoaddress 101 $miner_address) | |
| txid=$($bbcli listunspent | jq '.[].txid') | |
| unsigned_raw_tx=$($bbcli createrawtransaction "[{\"txid\":\"$txid\", \"vout\":0}]" "[{\"$address\":30}]") | |
| $bbcli testmempoolaccept "[\"$unsigned_raw_tx\"]" |
This file contains hidden or 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
| cat wasabi.json | jq '[.address.transactions[] | {"txid":.txid, time:(.time | strftime("%Y-%m-%d"))}] | group_by(.time) | map({"date": .[0].time, "count": length})' | |
| cat wasabi.json | jq -r '[.address.transactions[] | {"txid":.txid, time:(.time | strftime("%Y-%m-%d")) } ] | group_by(.time) | map([.[0].time, length])[] | @csv' |
This file contains hidden or 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
| #!/bin/bash | |
| sudo lldb-4.0 -o "process attach -p $1" \ | |
| -o "plugin load /usr/share/dotnet/shared/Microsoft.NETCore.App/2.2.0/libsosplugin.so" \ | |
| -o "sos DumpHeap -stat" \ | |
| -o "exit" |
This file contains hidden or 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
| <Project Sdk="Microsoft.NET.Sdk"> | |
| <PropertyGroup> | |
| <OutputType>Exe</OutputType> | |
| <TargetFramework>netcoreapp2.2</TargetFramework> | |
| </PropertyGroup> | |
| <ItemGroup> | |
| <PackageReference Include="NBitcoin" Version="4.1.1.73" /> | |
| </ItemGroup> |
OlderNewer