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.
Service | Usage(Click to copy) |
---|---|
World time Get current time for cities. Pass city names without spaces suffixed with .time. Optional two letter country codes. |
dig mumbai.time @dns.toys |
Timezone conversion Convert time between cities using format YYYY-MM-DDTHH:MM-$fromCity-$toCity |
dig 2023-05-28T14:00-mumbai-paris/fr.time @dns.toys |
Weather Get weather for cities. Pass city names without spaces. Optional country codes. |
dig mumbai.weather @dns.toys |
Unit conversion Convert between 70+ different units |
dig 42km-mi.unit @dns.toys |
Currency conversion Convert between currencies using daily rates |
dig 100USD-INR.fx @dns.toys |
IP echo Show your IPv4 or IPv6 address |
dig -4 ip @dns.toys |
Number to words Convert numbers to English words |
dig 987654321.words @dns.toys |
CIDR range Find first and last usable IP in subnet |
dig 10.0.0.0/24.cidr @dns.toys |
Base conversion Convert between number bases (hex, dec, oct, bin) |
dig 100dec-hex.base @dns.toys |
Pi Print digits of Pi |
dig pi @dns.toys |
Dictionary Get English word definitions (use dashes for spaces) |
dig fun.dict @dns.toys |
Dice roll Roll dice with specified number and sides |
dig 3d20/2.dice @dns.toys |
Coin toss Flip one or more coins |
dig 2.coin @dns.toys |
Random number generation Generate random number in a given range |
dig 1-100.rand @dns.toys |
Epoch conversion Convert Unix timestamp to readable date |
dig 784783800.epoch @dns.toys |
Aerial distance Calculate distance between lat-long pairs |
dig 12.9352,77.6245/12.9698,77.7500.aerial @dns.toys |
UUID generation Generate UUIDs (v4) |
dig 5.uuid @dns.toys |
Sudoku solver Solve Sudoku puzzles (use 0 for empty cells) |
dig 002840003...sudoku @dns.toys |
Developer excuses Get a random developer excuse |
dig excuse @dns.toys |
NanoID generation Generate NanoIDs with specified length |
dig 5.10.nanoid @dns.toys |
IFSC lookup Get bank (India) details for IFSC code |
dig ABNA0000001.ifsc @dns.toys |
Add a shortcut command dy
which can be used like dy mumbai.weather
Shell | Description |
---|---|
Bash | Add to ~/.bashrc alias dy="dig +short @dns.toys" |
Fish | Add to ~/.config/fish/config.fish alias dy="dig +noall +answer +additional $argv @dns.toys" |
Zsh | Add to ~/.zshrc alias dy="dig +short @dns.toys" |