Skip to content

Instantly share code, notes, and snippets.

View Raphael-Fastgen's full-sized avatar

Raphael-Fastgen

View GitHub Profile
@Raphael-Fastgen
Raphael-Fastgen / db-query.sql
Last active August 9, 2023 20:07
SQL query to write crypto data to database
INSERT INTO crypto (name, price, change)
VALUES
({{steps.get-cryptos.outputs.Body.data.[steps.loop.i].name}},
CONCAT('$',ROUND({{steps.get-cryptos.outputs.Body.data.[steps.loop.i].quote.USD.price}}, 2)::numeric),
CONCAT(ROUND({{steps.get-cryptos.outputs.Body.data.[steps.loop.i].quote.USD.percent_change_24h}}, 2)::numeric, '%'))
@Raphael-Fastgen
Raphael-Fastgen / webflow-custom-code.js
Last active August 20, 2024 11:34
Load API data into Webflow
<script>
var request = new XMLHttpRequest()
request.open('GET', 'INSERT_URL_HERE', true)
request.onload = function () {
var data = JSON.parse(this.response)
if (request.status >= 200 && request.status < 400) {
data.results.forEach(board => {
const card = document.createElement('div')