openpgp4fpr:9aa28159fceb3cd83bc212017e869146699108c7
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
# see https://explorer.dn42.dev/#/inet6num/fde0:93fa:7a0:2::_64 | |
if ! ARGV[0] | |
puts "arg 0 is the asn" | |
end | |
asn = ARGV[0] | |
asn_bin = asn.to_i.to_s(2) | |
asn_low16 = asn_bin[0...16].to_i(2).to_s(16) | |
asn_high16 = asn_bin[16..-1].to_i(2).to_s(16) |
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
# Copyright (c) 2022 Marek Kuethe | |
# License: WTFPL | |
# This script pings all Yggdrasil nodes and then displays a recommendation of | |
# nodes. The script is assumed to be in the public-peers folder. If not, a | |
# different folder can be given as an argument. Nodes that cannot be reached via | |
# TLS or TCP are omitted. Each node is pinged 20 times over TCP. There is a 0.2 | |
# second pause after each ping. |
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
class BrainfuckInterpreter | |
BF_CHARS = { | |
inc_ptr: ">", | |
dec_ptr: "<", | |
inc_val: "+", | |
dec_val: "-", | |
loop_begin: "[", | |
loop_end: "]", |
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
def print_help | |
puts <<HELP | |
ruby ./bf_compile.rb [OPTIONS] [NUM_CELLS] file_to_compile.bf | |
Options: | |
-comments Don't translate Brainfuck comments into C | |
-stdlib Do not use stdlib.h to determine the successful exit status (EXIT_SUCCESSFUL) | |
-static Deactivates the analysis in order to generate a static output for input-independent code. | |
-analyzer Deactivates the analyzer | |
+tabs Used tabs instead of spaces for the indentations |
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
require "meshname" | |
require "resolv" | |
require "async/dns" | |
def parse_address str | |
case str | |
when /\A\[(?<address> .* )\]:(?<port> \d+ )\z/x | |
address, port = $~[:address], $~[:port] | |
when /\A(?<address> [^:]+ ):(?<port> \d+ )\z/x |
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
did:3:kjzl6cwe1jw145qhgqg0i7npr4mfseimjhy1p8avysib8ca3bc9kj6mfnwwi80j |
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
require "icap" | |
require "eth" | |
addr = ARGV[0] | |
if ! (addr == addr.downcase) && (! Eth::Utils.valid_address? addr) | |
puts "The supplied address failed the checksum test. It might be invalid." | |
end | |
puts "Address: #{addr.downcase}" |
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
require "csv" | |
if ! File.readable ARGV[0] | |
puts "I cannot read the file" | |
end | |
file = CSV.open(ARGV[0], "r") | |
data = file.read | |
crypto_column = 10 |
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
// SPDX-License-Identifier: WTFPL | |
pragma solidity ^0.8.9; | |
/* | |
The faucet is designed to just give you some "change" to get started. However, | |
since you don't have any money yourself at the start and therefore cannot do the | |
faucet, there is a "friends" function. A friend can make a request to the faucet | |
and you only get enough that you can make a request to the faucet yourself. From | |
this you get your starting credit. You can request a maximum of once for a friend, |
NewerOlder