This file contains 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
// https://www.reddit.com/r/ethdev/comments/7jyzlw/50_in_ether_prize_for_puzzle_in_this_tweet/ | |
// npm i bip39 ethereumjs-wallet allcombinations shuffle-array | |
const bip39 = require("bip39"); | |
const hdkey = require('ethereumjs-wallet/hdkey'); | |
const allcombinations = require('allcombinations'); | |
const shuffle = require('shuffle-array'); | |
let words = 'bright summer public tenant avocado chef depend romance school reason help start'; | |
This file contains 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
use strict; | |
use File::Map; | |
use Digest::MD5; | |
my $filename = shift || die "usage: $0 <file>"; | |
rss("Before map"); | |
{ |
This file contains 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
#!/usr/bin/env perl | |
# https://github.com/jgamble/Algorithm-Networksort/issues/8#issuecomment-184251064 | |
use common::sense; | |
use Algorithm::Networksort; | |
use Math::Combinatorics; | |
This file contains 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
use Algorithm::Networksort qw(:all); | |
use strict; | |
my @orig_arr = (9, "2 A", 3, 0, 4, "2 B", 7, "2 C", 1, "2 D"); | |
my @network = nw_comparators(scalar @orig_arr, algorithm => 'best'); | |
{ | |
my @arr = @orig_arr; |
This file contains 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
ssh -o ServerAliveInterval=30 -o ControlPersist=no -2MNx -S .junk_socket localhost & | |
MAINPID=$! | |
sleep 1 | |
ssh -tt -S .junk_socket localhost -- id & | |
PID1=$! | |
sleep 1 # <-- comment out this sleep to trigger race condition | |
ssh -tt -S .junk_socket localhost -- id & |