6

Useful utilities and toys over DNS

 1 year ago
source link: https://www.dns.toys/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Useful utilities and toys over DNS

DNS toys
GitHub

Useful utilities and services over DNS

dns.toys is a DNS server that takes creative liberties with the DNS protocol to offer handy utilities and services that are easily accessible via the command line.

Copy and run the below commands to try it out.

World time

dig mumbai.time @dns.toys

dig newyork.time @dns.toys

Pass city names without spaces suffixed with .time

Weather

dig mumbai.weather @dns.toys

dig newyork.weather @dns.toys

Pass city names without spaces suffixed with .weather. This service is powered by yr.no

Unit conversion

dig 42km-mi.unit @dns.toys

dig 32GB-MB.unit @dns.toys

$Value$FromUnit-$ToUnit. To see all 70 available units, dig unit @dns.toys

Currency conversion (forex)

dig 100USD-INR.fx @dns.toys

dig 50CAD-AUD.fx @dns.toys

$Value$FromCurrency-$ToCurrency. Daily rates are from exchangerate.host.

IP echo

dig ip @dns.toys

Echo your IP address.

Number to words

dig 987654321.words @dns.toys

Convert numbers to English words.

dig help @dns.toys

Lists available services.

Shortcut function

Add this bash function to your ~/.bashrc file. The + args show cleaner output from dig.

function dy { dig +noall +answer +additional "$1" @dns.toys; }

Add this to your fish config file.

alias dy="dig +noall +answer +additional $argv[1] @dns.toys"

Then, use the dy command as a shortcut.

dy berlin.time

dy mumbai.weather

dy 100USD-INR.fx

Why not? For fun. I spend a lot of time on the terminal and doing quick unit conversions, weather checks etc. without having to open a clunky search page is useful.

No guarantees are provided on the accuracy, timeliness, reliability, and appropriateness, or completeness of any services or data. They are provided "as is" and "as available" with no warranties or guarantees.

Kailash Nadh © 2022


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK