Fun Terminal APIs
These are some commands you can do from any Linux terminal. They all run through someone else's server, so any information you send will be visible to the owner.
Get the Current Weather
1curl wttr.in
It's best to open the terminal full-screen here to see the full result.
You can also do a city. For some reason, the default 'Glasgow' is somewhere in America, so I have to look up the real Glasgow by suffixing a tilda.
1curl wttr.in/Glasgow~
You can get a specific city with a space in it like this:
1curl wttr.in/San+Fransisco
Or even get the current moon phase:
1curl wttr.in/moon
Send a File
Send a small file, and get a URL to it.
1curl -F"file=@[ your file" https://ttm.sh
Stick this in your .bashrc for easier use:
function sendfile(){
curl -F"file=@$1" https://ttm.sh
}
Now you can do sendfile myfile.md, and get the URL back instantly.
Post text and get a URL
echo 'random message' | ncat termbin.com 9999
Quick Cheat Sheet
1curl cht.sh/htop
This returns a tldr on htop.
Get Info on an IP
Look up location info about an IP address.
1curl http://api.db-ip.com/v2/free/*1.1.1.1*
Get a Definition
Get a word's definition:
1curl dict://dict.org/define:[ word:
You can add it to your .bashrc like this:
1function wotsa(){
2 curl dict://dict.org/define:$1:
3}
Then get a definition simply by typing wotsa kobold.
Stock Prices
Get current stock prices.
1curl -L stonks.icu/btc
You can add multiple stocks by simply appending them, e.g. stonks.icu/btc/amd.