I want to put a price ticker below the footer text of my website https://bitcoinmaxinews.com/ displaying something like this; "$1 = 4,800 Satoshi". Does anyone have a good one? It was harder to find than I thought it would be...
pull down to refresh
160 sats \ 2 replies \ @nerd2ninja 26 Oct 2022
reply
197 sats \ 1 reply \ @ski 26 Oct 2022 freebie
What language is this? Just starting to learn to code and might try playing with this in Replit.
reply
10 sats \ 0 replies \ @nerd2ninja 26 Oct 2022
Ruby mostly. Here's the thing with throwing up example code on the fly tho, I didn't run any of it to test. I'm already noticing things I missed. Like the fact that curl is a terminal command not native to ruby so you have to make a system call
price = system("curl https://www.usdsat.com/")
Bottom part is html5 but it uses ERB (embedded ruby) into the erb file (which is used instead of an html file) specifically used in the web development framework "ruby on rails".
Also, if you want to make a desktop app, I found the "glimmer" gem (modules in ruby are called gems) to be pretty good for that. glimmer references several ui frameworks and I like to use libui through glimmer.
ruby is an interpretive language, but it interprets to C (the programming language) so if you use sorbet and llvm you can compile your code rather than interpret it.
You should click on my nym here on stacker news. I got my repl linked where you can see some stuff I worked on (in the portfolio folder, the other folders were useful projects I forked)
reply
240 sats \ 0 replies \ @criptopanas 26 Oct 2022 freebie
Maybe this web site could give you an idea: https://manysats.com/
reply
200 sats \ 2 replies \ @earnbitcoin 26 Oct 2022
It could be written pretty easily.
Truncate the value (at the decimal) returned from this API call:
https://blockchain.info/tobtc?currency=USD&value=100000000
reply
25 sats \ 0 replies \ @BitcoinMaxiNewsdotCom OP 27 Oct 2022
I don't have the skill/knowledge. How much sats to do it? And a 1btc = $ amount as well? 🙂
reply
25 sats \ 0 replies \ @nerd2ninja 26 Oct 2022
If I knew about this I would have used it in my example instead XD
reply
30 sats \ 0 replies \ @DeezSats 28 Oct 2022
Something like this? https://sats.expert
reply